aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/alg.c17
-rw-r--r--src/alg.h1
-rw-r--r--src/steps.c8
3 files changed, 22 insertions, 4 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);
diff --git a/src/alg.h b/src/alg.h
index 8f55c15..7d11a7d 100644
--- a/src/alg.h
+++ b/src/alg.h
@@ -12,6 +12,7 @@ extern Moveset moveset_HTM;
12extern Moveset moveset_URF; 12extern Moveset moveset_URF;
13extern Moveset moveset_eofb; 13extern Moveset moveset_eofb;
14extern Moveset moveset_drud; 14extern Moveset moveset_drud;
15extern Moveset moveset_drud_noD;
15extern Moveset moveset_htr; 16extern Moveset moveset_htr;
16 17
17void append_alg(AlgList *l, Alg *alg); 18void append_alg(AlgList *l, Alg *alg);
diff --git a/src/steps.c b/src/steps.c
index 85732e7..383acaa 100644
--- a/src/steps.c
+++ b/src/steps.c
@@ -751,7 +751,7 @@ dranyslice_DR = {
751 .ready = check_drud, 751 .ready = check_drud,
752 .ready_msg = check_drany_msg, 752 .ready_msg = check_drany_msg,
753 .is_valid = always_valid, 753 .is_valid = always_valid,
754 .moveset = &moveset_drud, 754 .moveset = &moveset_drud_noD,
755 755
756 .detect = detect_pretrans_drud, 756 .detect = detect_pretrans_drud,
757 757
@@ -770,7 +770,7 @@ drudslice_drud = {
770 .ready = check_drud, 770 .ready = check_drud,
771 .ready_msg = check_dr_msg, 771 .ready_msg = check_dr_msg,
772 .is_valid = always_valid, 772 .is_valid = always_valid,
773 .moveset = &moveset_drud, 773 .moveset = &moveset_drud_noD,
774 774
775 .pre_trans = uf, 775 .pre_trans = uf,
776 776
@@ -789,7 +789,7 @@ drrlslice_drrl = {
789 .ready = check_drud, 789 .ready = check_drud,
790 .ready_msg = check_dr_msg, 790 .ready_msg = check_dr_msg,
791 .is_valid = always_valid, 791 .is_valid = always_valid,
792 .moveset = &moveset_drud, 792 .moveset = &moveset_drud_noD,
793 793
794 .pre_trans = rf, 794 .pre_trans = rf,
795 795
@@ -808,7 +808,7 @@ drfbslice_drfb = {
808 .ready = check_drud, 808 .ready = check_drud,
809 .ready_msg = check_dr_msg, 809 .ready_msg = check_dr_msg,
810 .is_valid = always_valid, 810 .is_valid = always_valid,
811 .moveset = &moveset_drud, 811 .moveset = &moveset_drud_noD,
812 812
813 .pre_trans = fd, 813 .pre_trans = fd,
814 814

Generated with cgit - Back to sebastiano.tronto.net