Skip to content

v1.7.1

Choose a tag to compare

@thewizardplusplus thewizardplusplus released this 06 Mar 19:07
· 86 commits to master since this release

Moving the chessmodels.perft() function from the tests to the main code; adding the go-chess-perft tool and the example for the chessmodels.MoveGenerator.MovesForColor() method; bug fixing.

Change Log

  • new features:
    • transform the chessmodels.Board.CheckMove() method to an independent function;
    • the chessmodels.Perft() function:
      • move the chessmodels.perft() function from the tests to the main code;
      • pass a handler to all levels in the chessmodels.Perft() function;
      • pass a move generator to the chessmodels.Perft() function via an interface;
    • add the go-chess-perft tool;
  • bug fixing:
    • fix rune conversion from an integer to a string in the uci.EncodePosition() function;
    • fix incorrect calculation of the last file in the uci.EncodePieceStorage() function;
  • refactoring:
    • simplify the utility functions in the pieces package;
    • merge the chessmodels.pieceGroup type with the chessmodels.Board structure;
  • unit testing:
    • complete the tests:
      • of the pieces.NewPiece() function;
      • of the uci.DecodePiece() function;
      • of the uci.EncodePiece() function;
    • add the long-playing tests to the Travis CI configuration;
  • examples:
    • remove the examples:
      • remove the examples with a mock piece;
      • remove the redundant examples;
    • add the example for the chessmodels.MoveGenerator.MovesForColor() method.

Features

  • representing the board as an associative array of pieces with their positions as keys;
  • 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;
  • utilities:
    • utility for counting all possible moves (based on the perft function).