add castling + fix promote undo
This commit is contained in:
@@ -20,7 +20,6 @@ import chess.controller.OutputSystem;
|
||||
import chess.controller.commands.CastlingCommand;
|
||||
import chess.controller.commands.GetAllowedMovesCommand;
|
||||
import chess.controller.commands.GetPieceAtCommand;
|
||||
import chess.controller.commands.GrandCastlingCommand;
|
||||
import chess.controller.commands.MoveCommand;
|
||||
import chess.controller.commands.PromoteCommand;
|
||||
import chess.controller.commands.PromoteCommand.PromoteType;
|
||||
@@ -61,11 +60,11 @@ public class Window extends JFrame implements OutputSystem {
|
||||
|
||||
private void buildButtons(JPanel bottom) {
|
||||
castlingButton.addActionListener((event) -> {
|
||||
sendCommand(new CastlingCommand());
|
||||
sendCommand(new CastlingCommand(false));
|
||||
});
|
||||
|
||||
bigCastlingButton.addActionListener((event) -> {
|
||||
sendCommand(new GrandCastlingCommand());
|
||||
sendCommand(new CastlingCommand(true));
|
||||
});
|
||||
|
||||
undoButton.addActionListener((event) -> {
|
||||
|
||||
Reference in New Issue
Block a user