A from-scratch legal-move engine β castling, en passant, promotion, check and checkmate detection, all implemented here. Play White against the built-in AI.