If the threefold repitition check is called before enough moves
are saved in the previous board state it throws a nullpointer.
A simple null check solves the problem
Integrated the engine into the playable game.
Created a menu to choose between single player and hotseat.
Added a way to choose difficulty and color in single player.
I created an engine, that uses a basic version of the minimax algorithm
to evaluate a position.
It then evaluates all the possible next moves in a given position and picks
the one that has the best evaluation.
Basic test cases were also added.
Moved was a 10x12 1-d array, that stored bools.
It was only used for checking if a pawn moved (especially important for
the double move of the pawns) and if the other pieces moved (important
for checking if the player can castle or not).
The pawn moves are now checked by the starting position (pawns on the
second rank cant be already moved).
The castle rights of a game are expressed as CastleRights, a tuple with 4 bools.
This saves basically 116 boolean values.
Setters are not needed as all the assigning gets handled inside the file.
All Setters were removed.
The try-statements were used to excessively and were changed for manual checking
Due to the official nim documentation the snake_case was now swapped
for camelCase.
Tests for nearly any move were added.
A new procedure can initialize a game with a given 8x8 board with pieces and determines if
they have been moved already.
The most important movements and even en passant and castling are implemented.
A cli game is not done for now.
An engine is the goal of the project, but will be focussed at the end of the basic development.