Adding the boards.BitBoard structure; adding the go-chess-moves and go-chess-comparator tools.
Change Log
- new features:
- the
boards.BitBoardstructure:- add the
boards.BitBoardstructure; - add the
boards.BitBoardstructure to thego-chess-perfttool;
- add the
- add the
go.modfile; - tools:
- improve the
go-chess-perfttool:- improve the documentation;
- improve the options;
- validate the
deepoption;
- add the
go-chess-movestool; - add the
go-chess-comparatortool;
- improve the
- the
- refactoring:
- fix the code style with the
golangci-linttool;
- fix the code style with the
- unit testing:
- improve the tests of the
ApplyMove()methods;
- improve the tests of the
- examples:
- move the tests of the
boardspackage to the right place.
- move the tests of the
Features
- representing the board:
- as an associative array of pieces with their positions as keys;
- as a plain array of pieces with exact correspondence array indices to piece positions;
- as a set of integers corresponding to a particular combination of piece color and type, and where each bit corresponds to a particular piece position (so-called a bitboard);
- immutable applicating moves to the board via copying the latter;
- checkings of moves:
- universal;
- individual for all types of pieces;
- generating moves via filtering from all possible ones;
- move restrictions (abandoned moves):
- pawn double-move;
- en passant capture;
- promotion;
- castling;
- perft function;
- using an abstraction of a piece;
- Forsyth-Edwards Notation:
- parsing:
- of a position;
- of a move;
- of a piece kind;
- of a piece color;
- of a board;
- serialization:
- of a position;
- of a move;
- of a piece kind;
- of a piece color;
- of a board;
- parsing:
- utilities:
- utility for counting all possible moves (based on the perft function);
- utility for generating all possible chess moves;
- utility for comparing the generation of all possible chess moves by different board representations.