nissy-classic

Stable branch of nissy
git clone https://git.tronto.net/nissy-classic
Download | Log | Files | Refs | README | LICENSE

commit 6c05a5accff2055ddac64504571e52d945bcd372
parent fd865fc493af21efe02f54f2a557c36f43aed3c3
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date:   Sat, 28 Oct 2023 10:19:36 +0200

Do not use D for drslice

Diffstat:
Msrc/alg.c | 17+++++++++++++++++
Msrc/alg.h | 1+
Msrc/steps.c | 8++++----
3 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/src/alg.c b/src/alg.c @@ -6,6 +6,7 @@ static bool allowed_HTM(Move m); static bool allowed_URF(Move m); static bool allowed_eofb(Move m); static bool allowed_drud(Move m); +static bool allowed_drud_noD(Move m); static bool allowed_htr(Move m); static bool allowed_next_HTM(Move l2, Move l1, Move m); static int axis(Move m); @@ -46,6 +47,12 @@ moveset_drud = { }; Moveset +moveset_drud_noD = { + .allowed = allowed_drud_noD, + .allowed_next = allowed_next_HTM, +}; + +Moveset moveset_htr = { .allowed = allowed_htr, .allowed_next = allowed_next_HTM, @@ -57,6 +64,7 @@ static Moveset * all_ms[] = { &moveset_URF, &moveset_eofb, &moveset_drud, + &moveset_drud_noD, &moveset_htr, }; @@ -95,6 +103,15 @@ allowed_drud(Move m) } static bool +allowed_drud_noD(Move m) +{ + Move b = base_move(m); + + return b == U || + ((b == R || b == L || b == F || b == B) && m == b + 1); +} + +static bool allowed_htr(Move m) { Move b = base_move(m); diff --git a/src/alg.h b/src/alg.h @@ -12,6 +12,7 @@ extern Moveset moveset_HTM; extern Moveset moveset_URF; extern Moveset moveset_eofb; extern Moveset moveset_drud; +extern Moveset moveset_drud_noD; extern Moveset moveset_htr; void append_alg(AlgList *l, Alg *alg); diff --git a/src/steps.c b/src/steps.c @@ -751,7 +751,7 @@ dranyslice_DR = { .ready = check_drud, .ready_msg = check_drany_msg, .is_valid = always_valid, - .moveset = &moveset_drud, + .moveset = &moveset_drud_noD, .detect = detect_pretrans_drud, @@ -770,7 +770,7 @@ drudslice_drud = { .ready = check_drud, .ready_msg = check_dr_msg, .is_valid = always_valid, - .moveset = &moveset_drud, + .moveset = &moveset_drud_noD, .pre_trans = uf, @@ -789,7 +789,7 @@ drrlslice_drrl = { .ready = check_drud, .ready_msg = check_dr_msg, .is_valid = always_valid, - .moveset = &moveset_drud, + .moveset = &moveset_drud_noD, .pre_trans = rf, @@ -808,7 +808,7 @@ drfbslice_drfb = { .ready = check_drud, .ready_msg = check_dr_msg, .is_valid = always_valid, - .moveset = &moveset_drud, + .moveset = &moveset_drud_noD, .pre_trans = fd,