Encode board steps in an unambiguous way
authorH.G.Muller <hgm@hgm-xboard.(none)>
Sat, 3 Jan 2026 18:10:11 +0000 (19:10 +0100)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Sat, 3 Jan 2026 19:23:37 +0000 (20:23 +0100)
commit1217cc687d1c6850537809d97aa9eff3277329d0
treed28d904fdf27ec56217dc6057ba93ddf3ddf0f1c
parent885518750c4fa19658df01e4b6993afcef9646bd
Encode board steps in an unambiguous way

The steps/slider/hopper arrays that pass the leaps a piece can make from
the betza parser to the routines in bitboard.cpp that generate attack
sets from those are now encoded as if they are for a board of 32 files,
in a new integer type DirectionCode. Routines to convert this from and
to Direction are provided. This allows unambiguous encoding of moves by
the board step for boards of up to 16 files, while using the board step
itself already became ambiguous with leaps that moved 4 files.
src/bitboard.cpp
src/parser.cpp
src/piece.cpp
src/piece.h
src/psqt.cpp
src/types.h