Moderator: Andres Valverde
Teemu Pudas wrote:Move generation: I recommend doing it the same way you do it in normal chess, i.e. figure out which squares need to be empty/unattacked before the game. Of course, the initialization code is a bit more complicated...
Special case: you need to check for an enemy queen/rook on A1 (A8) if the queenside rook is on the B-file.
Teemu Pudas wrote:Makemove: IMO the only clean way is to clear both squares first.
The problem is: how i keep track of castling rigths after makemove?
CastlingRights &= CastleMask[from] & CastleMask[to]; // CastleMask[WhiteKingRook] == everything but white kingside castling
Teemu Pudas wrote:
When in doubt, see what Fruit does:
I understand this is pretty common (both the method and the part about Fruit ).
Return to Programming and Technical Discussions
Users browsing this forum: No registered users and 14 guests