A first attempt at creating chess application.
- Move legality checking:
- Pawns
- En passant
- Kings (without checking for checks)
- Kings (with checking for check)
- Rooks
- Bishops
- Queens
- Knights
- Castling
- Pawn promotion
- Checking
- Checkmate
- Stalemate
- 50 move rule
- Draw by repetition
- Universal Chess Interface (UCI) compatability
- The game stores the location of an en passant target pawn, rather than the square in which will get moved into by the enemy. I.e if white's a-file pawn moves to a4, we need to store the en passant target as "a3" as this aligns with FEN notation.
This is for sections of code that I'm not happy with, and think needs reviewing:
- OH GOD this is all spaghetti code. Just reading "Clean Code" atm and it has opened my eyes goddamn
- En passant functionality. It seems overly complicated and involves too much repetition. I reckon it could be optimised and refactored significantly.