From b17f0d8ac15d3f245a25c9e02dd010759e6bf3e8 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Sun, 31 May 2020 19:22:29 +0200 Subject: [PATCH] Fix oblique multi-leg moves in XBetza Continuation legs of oblique atoms have thei directional modifiers interpreted in the K system. But this had as an intended side effect that they were split into a diagonal and orthogonal atom for separate treatment, which for obliques is of course not possible, nor needed. So this code is bypassed for the obliques now. --- moves.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/moves.c b/moves.c index da1aa13..f0fa2db 100644 --- a/moves.c +++ b/moves.c @@ -387,6 +387,7 @@ MovesFromString (Board board, int flags, int f, int r, int tx, int ty, int angle if(!dirSet) dirSet = (tx < 0 ? 0xFF // default is all directions, but in continuation leg : all == 0xFF ? 0xEF : 0x45); // omits backward, and for 4-fold atoms also diags dirSet = (dirSet << angle | dirSet >> 8-angle) & 255; // re-orient direction system + if(dx && dx != dy) break; // oblique continuation ds2 = dirSet & 0xAA; // extract diagonal directions if(dirSet &= 0x55) // start with orthogonal moves, if present retry = 1, dx = 0; // and schedule the diagonal moves for later -- 1.7.0.4