diff --git a/src/dev/kske/chess/game/Game.java b/src/dev/kske/chess/game/Game.java index 8bd4456..5cf150c 100644 --- a/src/dev/kske/chess/game/Game.java +++ b/src/dev/kske/chess/game/Game.java @@ -3,6 +3,8 @@ package dev.kske.chess.game; import java.util.HashMap; import java.util.Map; +import javax.swing.JOptionPane; + import dev.kske.chess.board.Board; import dev.kske.chess.board.GameState; import dev.kske.chess.board.Move; @@ -78,7 +80,9 @@ public class Game { switch (eventType) { case CHECKMATE: case STALEMATE: - System.out.printf("%s in %s!%n", player.color.opposite(), eventType); + String result = String.format("%s in %s!%n", player.color.opposite(), eventType); + System.out.print(result); + JOptionPane.showMessageDialog(boardComponent, result); break; case CHECK: System.out.printf("%s in check!%n", player.color.opposite()); diff --git a/src/dev/kske/chess/ui/MainWindow.java b/src/dev/kske/chess/ui/MainWindow.java index b103a47..29f32af 100644 --- a/src/dev/kske/chess/ui/MainWindow.java +++ b/src/dev/kske/chess/ui/MainWindow.java @@ -59,7 +59,7 @@ public class MainWindow { mframe.setBounds(100, 100, 494, 565); mframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - mframe.setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("/pieces/king_white.png"))); + mframe.setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("/pieces/queen_white.png"))); boardPane = new BoardPane(); mframe.getContentPane().add(boardPane, BorderLayout.CENTER);