aboutsummaryrefslogtreecommitdiff
path: root/test/077_copy_corners/copy_corners_tests.c
blob: 02e949bcea1f1b720e00e20a0ffe3dc2233c59e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include "../test.h"

void copy_corners(cube_t *, cube_t);

void run(void) {
	char str[STRLENMAX];
	oriented_cube_t c1, c2;

	fgets(str, STRLENMAX, stdin);
	c1 = readcube(str);

	fgets(str, STRLENMAX, stdin);
	c2 = readcube(str);

	copy_corners(&c1.cube, c2.cube);

	if (iserror(c1)) {
		printf("Error setting EO\n");
	} else if (!isconsistent(c1)) {
		printf("Setting EO resulted in inconsistent cube\n");
	} else {
		writecube(c1, NISSY_SIZE_CUBE, str);
		printf("%s\n", str);
	}
}

Generated with cgit - Back to sebastiano.tronto.net