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.
Im not pleased with my old castle moves generator for normal chess too, so in the new rewritten version of RataAeroespacial, I plan to handle FRC and normal chess altogether, after all, normal chess is a subset of FRC.
I like the technique you describe, i could save the squares that need to be empty/unattacked into an array during initialization.
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? how i know if a rook is a-side or h-side when i move it, so i update castling rigths correctly? Im playing with some ideas here, but them are all too slow for being part of Makemove.