aboutsummaryrefslogtreecommitdiff
path: root/test/001_pieces/pieces_tests.c
blob: f3d8d4ef60128be0c5933aa219bbe452096cd518 (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
26
27
28
#include "../test.h"

uint8_t corner(cube_fast_t, int);
uint8_t edge(cube_fast_t, int);

int main(void) {
	int i;
	char str[STRLENMAX], *aux;
	cube_t cube;
	cube_fast_t fast;

        aux = str;
	while (fgets(aux, STRLENMAX, stdin) != NULL)
		while (*aux != '\n')
			aux++;

	cube = readcube("H48", str);
	fast = cubetofast(cube);

	for (i = 0; i < 8; i++)
		printf("%" PRIu8 " ", corner(fast, i));
	printf("\n");
	for (i = 0; i < 12; i++)
		printf("%" PRIu8 " ", edge(fast, i));
	printf("\n");

	return 0;
}

Generated with cgit - Back to sebastiano.tronto.net