Skip to content

Latest commit

 

History

History
35 lines (30 loc) · 1.11 KB

README.md

File metadata and controls

35 lines (30 loc) · 1.11 KB

Jack's Chess Game

A first attempt at creating chess application.

Game rules implemented:

  • 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

Known issues

  • 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.

Code to be reviewed

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.