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
29
30
31
32
33
34
|
#ifndef TRANSFORMATIONS_H
#define TRANSFORMATIONS_H
#include <stdio.h>
#include <stdbool.h>
#include <stdint.h>
#include "cube.h"
#include "moves.h"
#include "utils.h"
#define NROTATIONS (mirror+1)
/* Letters indicate top and front centers
* Mirror is wrt rl
* Lowercase letter to distinguish from pieces */
typedef enum {
uf, ur, ub, ul,
df, dr, db, dl,
rf, rd, rb, ru,
lf, ld, lb, lu,
fu, fr, fd, fl,
bu, br, bd, bl,
mirror,
} Transformation;
void print_transformation(Transformation t);
Cube transform_cube(Transformation t, Cube cube);
void transform_alg(Transformation t, NissMove *alg); /* Applied in-place */
void init_transformations(bool read, bool write);
#endif
|