aboutsummaryrefslogtreecommitdiff
path: root/old/2021-02-28-transformcube-works/src/transformations.h
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano.tronto@gmail.com>2021-11-11 21:37:34 +0100
committerSebastiano Tronto <sebastiano.tronto@gmail.com>2021-11-11 21:37:34 +0100
commit3568412f8f230774d0d11d7ed1c897424f95d3ef (patch)
tree77223792d8c925a9b1fc32b3f4341e943b5f8209 /old/2021-02-28-transformcube-works/src/transformations.h
parent67e1b5e6e6a2c917a2fe58a37a1382c982b1e5c5 (diff)
downloadnissy-3568412f8f230774d0d11d7ed1c897424f95d3ef.tar.gz
nissy-3568412f8f230774d0d11d7ed1c897424f95d3ef.zip
Rewritten from scratch. Welocme nissy 2.0!
Diffstat (limited to 'old/2021-02-28-transformcube-works/src/transformations.h')
-rw-r--r--old/2021-02-28-transformcube-works/src/transformations.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/old/2021-02-28-transformcube-works/src/transformations.h b/old/2021-02-28-transformcube-works/src/transformations.h
new file mode 100644
index 0000000..c42cc34
--- /dev/null
+++ b/old/2021-02-28-transformcube-works/src/transformations.h
@@ -0,0 +1,34 @@
1#ifndef TRANSFORMATIONS_H
2#define TRANSFORMATIONS_H
3
4#include <stdio.h>
5#include <stdbool.h>
6#include <stdint.h>
7#include "cube.h"
8#include "moves.h"
9#include "utils.h"
10
11#define NROTATIONS (mirror+1)
12
13/* Letters indicate top and front centers
14 * Mirror is wrt rl
15 * Lowercase letter to distinguish from pieces */
16
17typedef enum {
18 uf, ur, ub, ul,
19 df, dr, db, dl,
20 rf, rd, rb, ru,
21 lf, ld, lb, lu,
22 fu, fr, fd, fl,
23 bu, br, bd, bl,
24 mirror,
25} Transformation;
26
27void print_transformation(Transformation t);
28
29Cube transform_cube(Transformation t, Cube cube);
30void transform_alg(Transformation t, NissMove *alg); /* Applied in-place */
31
32void init_transformations(bool read, bool write);
33
34#endif

Generated with cgit - Back to sebastiano.tronto.net