aboutsummaryrefslogtreecommitdiff
path: root/old/2021-05-26-before-restyle/moves.h
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano.tronto@gmail.com>2021-11-11 22:05:00 +0100
committerSebastiano Tronto <sebastiano.tronto@gmail.com>2021-11-11 22:05:00 +0100
commit4fb67201414169a2687f41c4056b2e284b4938cb (patch)
treea68246e3e21435229541f83f485ab41cfb2ba08a /old/2021-05-26-before-restyle/moves.h
parent3568412f8f230774d0d11d7ed1c897424f95d3ef (diff)
downloadnissy-4fb67201414169a2687f41c4056b2e284b4938cb.tar.gz
nissy-4fb67201414169a2687f41c4056b2e284b4938cb.zip
Removed old files
Diffstat (limited to '')
-rw-r--r--old/2021-05-26-before-restyle/moves.h51
1 files changed, 0 insertions, 51 deletions
diff --git a/old/2021-05-26-before-restyle/moves.h b/old/2021-05-26-before-restyle/moves.h
deleted file mode 100644
index 0608e1b..0000000
--- a/old/2021-05-26-before-restyle/moves.h
+++ /dev/null
@@ -1,51 +0,0 @@
1#ifndef MOVES_H
2#define MOVES_H
3
4#include <stdio.h>
5#include <stdbool.h>
6#include <stdint.h>
7#include "cube.h"
8#include "utils.h"
9
10#define NMOVES (z3+1)
11
12typedef enum {
13 NULLMOVE,
14 U, U2, U3, D, D2, D3, R, R2, R3, L, L2, L3, F, F2, F3, B, B2, B3,
15 Uw, Uw2, Uw3, Dw, Dw2, Dw3, Rw, Rw2, Rw3,
16 Lw, Lw2, Lw3, Fw, Fw2, Fw3, Bw, Bw2, Bw3,
17 M, M2, M3, S, S2, S3, E, E2, E3,
18 x, x2, x3, y, y2, y3, z, z2, z3,
19} Move;
20
21/* An alg is an array of "NissMoves", which can be on normal or on inverse. */
22typedef struct { bool inverse; Move m; } NissMove;
23
24/* Movesets */
25extern bool standard_moveset[NMOVES];
26
27extern bool commute[NMOVES][NMOVES];
28extern bool possible_next[NMOVES][NMOVES][NMOVES];
29extern Move inverse[NMOVES];
30extern NissMove rotation_algs[24][3]; /* Same order as transformations */
31
32int len(NissMove *alg);
33int copy_alg(NissMove *src, NissMove *dest); /*return number of moves copied */
34int invert_alg(NissMove *src, NissMove *dest);
35int concat(NissMove *src1, NissMove *src2, NissMove *dest);
36void print_alg(NissMove *alg);
37int read_moves(char *str, NissMove *alg, int n); /* reads at most n moves */
38void cleanup(NissMove *src, int n); /* rewrites using basic moves, at most n */
39
40bool is_solved_up_to_reorient(Cube cube);
41Cube move_cube(Move m, Cube cube);
42Cube apply_alg(NissMove *alg, Cube cube);
43Cube apply_alg_filtered(NissMove *alg, Cube cube, PieceFilter f);
44
45/* Merge the following two?
46 always in this order */
47void init_ttables(bool read, bool write);
48void init_aux_tables();
49
50
51#endif

Generated with cgit - Back to sebastiano.tronto.net