1
0
mirror of https://github.com/tiyn/yeschess.git synced 2025-04-01 14:47:44 +02:00
TiynGER 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
2020-12-14 18:00:05 +01:00
2020-12-16 03:29:43 +01:00
2020-12-14 23:42:08 +01:00

ychess

Attention: The Chess engine is not finished yet.

ychess-logo

ychess is a chess implementation and engine written in nim.

Usage

Simply download the code and run nim c -r game.nim. You can now play a 1v1 hotseat game of chess in the commandline.

Testing

Testing is done by einheit by jyapayne. All legal chess moves are implemented in chess.nim and tested by the TestSuite in test.nim. You can simply run the tests with nim c -r test.nim.

Documentation

Documentation is written into the code via DocGen. For this reason it is not saved in this repository. To extract it into html run nim doc --project --index:on --outdir:htmldocs game.nim

Board Representation

Due to easier off the board checking a 10x12 board is used.

Description
ychess is a chess implementation and engine written in nim.
Readme GPL-3.0 144 KiB
Languages
Nim 100%