aboutsummaryrefslogtreecommitdiff
path: root/src/alg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/alg.c')
-rw-r--r--src/alg.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/alg.c b/src/alg.c
index 2b5b93f..6a16d9a 100644
--- a/src/alg.c
+++ b/src/alg.c
@@ -6,6 +6,7 @@ static bool allowed_HTM(Move m);
6static bool allowed_URF(Move m); 6static bool allowed_URF(Move m);
7static bool allowed_eofb(Move m); 7static bool allowed_eofb(Move m);
8static bool allowed_drud(Move m); 8static bool allowed_drud(Move m);
9static bool allowed_drud_noD(Move m);
9static bool allowed_htr(Move m); 10static bool allowed_htr(Move m);
10static bool allowed_next_HTM(Move l2, Move l1, Move m); 11static bool allowed_next_HTM(Move l2, Move l1, Move m);
11static int axis(Move m); 12static int axis(Move m);
@@ -46,6 +47,12 @@ moveset_drud = {
46}; 47};
47 48
48Moveset 49Moveset
50moveset_drud_noD = {
51 .allowed = allowed_drud_noD,
52 .allowed_next = allowed_next_HTM,
53};
54
55Moveset
49moveset_htr = { 56moveset_htr = {
50 .allowed = allowed_htr, 57 .allowed = allowed_htr,
51 .allowed_next = allowed_next_HTM, 58 .allowed_next = allowed_next_HTM,
@@ -57,6 +64,7 @@ static Moveset * all_ms[] = {
57 &moveset_URF, 64 &moveset_URF,
58 &moveset_eofb, 65 &moveset_eofb,
59 &moveset_drud, 66 &moveset_drud,
67 &moveset_drud_noD,
60 &moveset_htr, 68 &moveset_htr,
61}; 69};
62 70
@@ -95,6 +103,15 @@ allowed_drud(Move m)
95} 103}
96 104
97static bool 105static bool
106allowed_drud_noD(Move m)
107{
108 Move b = base_move(m);
109
110 return b == U ||
111 ((b == R || b == L || b == F || b == B) && m == b + 1);
112}
113
114static bool
98allowed_htr(Move m) 115allowed_htr(Move m)
99{ 116{
100 Move b = base_move(m); 117 Move b = base_move(m);

Generated with cgit - Back to sebastiano.tronto.net