v1.8
·
53 commits
to master
since this release
Adding the chessmodels.SliceBoard structure; optimization.
Change Log
- new features:
- the
chessmodels.BaseBoardstructure that stores a board size; - the
chessmodels.SliceBoardstructure:- rename the
chessmodels.Boardstructure tochessmodels.MapBoard; - add the
chessmodels.SliceBoardstructure; - add the
chessmodels.SliceBoardstructure to thego-chess-perfttool; - make the
chessmodels.Boardtype redirect to thechessmodels.SliceBoardstructure;
- rename the
- transform the
Pieces()methods of thechessmodels.MapBoardandchessmodels.SliceBoardstructures to an independent function; - the
chessmodels.Sizestructure:- add the
PositionIndex()method; - add the
PositionCount()method; - add the
IteratePositions()method;
- add the
- the
- refactoring:
- optimize memory allocations;
- unit testing:
- slightly improve the tests of the
chessmodels.MapBoardstructure:- of the
Piece()method; - of the
ApplyMove()method;
- of the
- add the benchmarks based on the
chessmodels.Perft()function:- for the
chessmodels.MapBoardstructure; - for the
chessmodels.SliceBoardstructure.
- for the
- slightly improve 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;
- 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;
- 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).