3 ms·
If a pawn moves then you can't repeat a state either, can you? So track the last 75 "moves". > they can only move forward, except in the case of en-passant E
by Dylan16807 3y ago
If a pawn moves then you can't repeat a state either, can you? So track the last 75 "moves".
> they can only move forward, except in the case of en-passant
En passant still attacks forward, into the space the enemy pawn just moved through.
> 112 pawn moves without a capture (because there are only 16 pawns and they can only move forward
But pawns can't move through pawns. ~~At most I think you can have 4 of the pawns march all the way forward and get captured, leaving you with with 4 pawns that can move 6 spaces and 8 pawns that can move 7 spaces, for a total of 80 pawn moves without a capture.~~
Okay, if you sacrifice a bunch of other pieces to pawns, then you can get them to pair up without losing any. So that's 8 pawns moving 6 spaces, and 8 pawns moving 7 spaces. 104 pawn moves in a row without a capture.
- JoshuaDavid 3y ago> If a pawn moves then you can't repeat a state either, can you? So track the last 75 "moves". You are correct. So the board state from 75 moves previously plus 75 bytes to store the last 75 moves is sufficient to store a chess game state.
- Dylan16807 3y ago150 bytes because "moves" is defined in a very bad way here.