-
Notifications
You must be signed in to change notification settings - Fork 0
Integrating new piece types
winapiadmin edited this page Nov 22, 2025
·
2 revisions
Since this is formerly MultiTypeChess, of course you can implement new piece types.
There's something that needs to be implemented for each new piece types:
- Implement the piece enum (and also the forward declaration).
- Write
piece_of, and alsocolor_of. - Modify
enum_idxin types.h to calculate the linear index of the enum. - Instantitate the functions by adding
INSTANTITATE(your_type)into moves_io.cpp, position.cpp and printers.cpp - Adding the mapped Zobrist table in zobrist.cpp, and also change size of
zobrist::RandomPiecein zobrist.cpp (example in the codebase)
Test specification:
- Able to construct the corresponding enum value with
make_piece,piece_ofandcolor_of - Handles
NO_PIECE:
- For
color_of: returnCOLOR_NB(see #22) - For
piece_of/type_of: returnNO_PIECE_TYPE