Commit Graph
24 Commits
Author SHA1 Message Date
tiyn 91281d97a7 lichess: added lichess integration
Lichess is a free and open source platform to play chess.
Connection is realized via the berserk python plugin that uses the lichess api.
2021-04-29 01:15:54 +02:00
tiyn 7fb821254c game: added single player
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.
2021-04-27 23:13:41 +02:00
tiyn 4e69bd3977 engine: Readme update according to used algorithm 2021-04-27 00:55:30 +02:00
tiyn 4ba3e06d93 engine: first push for engine
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.
2021-04-27 00:49:39 +02:00
tiyn 0e27d0a6b5 chess: syntax and structure changes
gameTest renamed to chessTest due to it testing chess.nim and not game.nim.
always used += in chess.nim to increase readability.
2021-04-26 19:54:19 +02:00
tiyn 0a0accb3d0 chess: Moved replaced with CastleRights
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.
2020-12-18 01:01:58 +01:00
tiyn c91bf64047 chess restructuring: changed order of functions 2020-12-18 00:25:22 +01:00
tiyn 0ceb567048 structure: made a src folder and moved all source file into it 2020-12-16 04:24:19 +01:00
tiyn 6ad11fde2a chess: updating documentation
Documentation is now set for every method with complete parameters.
Also all global variables and constants as well as types are documented.
2020-12-16 04:19:02 +01:00
tiyn 9b68538b12 readme: specified plan for engine 2020-12-16 03:29:43 +01:00
tiyn c5cf2fd737 chess: refactoring setters and try
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
2020-12-16 03:18:24 +01:00
tiyn c4f7e3b98d chess: improved documentation and deleted unused stuff 2020-12-16 02:42:58 +01:00
tiyn 81d5d57e75 chess: refactoring getters
Getters are not needed according to the official nim documentation.
https://nim-lang.org/docs/manual.html#procedures-properties
Getters were replaced accordingly
2020-12-16 01:03:06 +01:00
tiyn 75e804ef6f chess/game: claimable draw at 50-Move-Rule added 2020-12-15 23:31:42 +01:00
tiyn 9ed8b886db chess/game: claimable draw at 3-fold repitition added 2020-12-15 20:30:04 +01:00
tiyn 7caa4db120 game bugfix: game isnt stopped after stalemate 2020-12-15 18:09:27 +01:00
tiyn 8e918aebb7 chess: draw by insufficient material added 2020-12-15 17:31:15 +01:00
tiyn 2b4598785d readme: added logo 2020-12-14 23:42:08 +01:00
tiyn 1cc88f6bf9 game bugfix: after castling toMove wasnt changed
If you castle correctly the toMove attribute of the game object wasnt changed.
This is now fixed.
2020-12-14 22:50:28 +01:00
tiyn 67a3ab4579 readme/license: updated/added 2020-12-14 18:00:05 +01:00
tiyn 97406d4da3 tests: added unittests
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.
2020-12-14 17:52:49 +01:00
tiyn f749f66c3c chess: code reformatting 2020-12-14 01:07:10 +01:00
tiyn e30ff1f3ba chess/game: base game completely implemented
All moves including en-passant and castling are implemented.
Game now features a proof of concept game.
Some cleanup still needs to be done.
2020-12-13 20:43:07 +01:00
tiyn b30aa89dc0 base: chess now basically works
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.
2020-12-12 22:57:02 +01:00