Open troygnichols opened 14 years ago
So, clearly there will need to be 4 castling flags - queenside/kingside black/white. Which would be the "clearner" approach - have these flags as fields on the ChessPiece, or have them as fields of the ChessBoard?
My initial feeling is that this should be implemented in ChessBoard, or even ChessGame (game might process a castling request from the UI and determine if it's allowed based on current state of the board). I think we should add as little as possible to the ChessPiece subclasses because they are really only supposed to model chess pieces and the associated movements, etc. Do you agree?
Castling is not really supported in the current incarnation of the chess engine. Add some functionality so the engine can tell if a castling move will be allowed or not.