fix warnings
This commit is contained in:
@@ -12,7 +12,10 @@ public class App {
|
|||||||
1 - Console
|
1 - Console
|
||||||
2 - Window
|
2 - Window
|
||||||
3 - 3D.""");
|
3 - 3D.""");
|
||||||
switch (new Scanner(System.in).nextLine()) {
|
Scanner scan = new Scanner(System.in);
|
||||||
|
String line = scan.nextLine();
|
||||||
|
scan.close();
|
||||||
|
switch (line) {
|
||||||
case "1", "Console", "console":
|
case "1", "Console", "console":
|
||||||
ConsoleMain.main(args);
|
ConsoleMain.main(args);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
package chess;
|
package chess;
|
||||||
|
|
||||||
import chess.ai.AI;
|
|
||||||
import chess.ai.minimax.AlphaBetaAI;
|
|
||||||
import chess.controller.CommandExecutor;
|
import chess.controller.CommandExecutor;
|
||||||
import chess.controller.commands.NewGameCommand;
|
import chess.controller.commands.NewGameCommand;
|
||||||
import chess.controller.event.GameAdaptator;
|
import chess.controller.event.GameAdaptator;
|
||||||
import chess.model.Color;
|
|
||||||
import chess.model.Game;
|
import chess.model.Game;
|
||||||
import chess.pgn.PgnExport;
|
import chess.pgn.PgnExport;
|
||||||
import chess.view.audio.GameAudio;
|
import chess.view.audio.GameAudio;
|
||||||
|
|||||||
@@ -74,15 +74,15 @@ public class Window extends JFrame implements GameListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void buildButtons(JPanel bottom) {
|
private void buildButtons(JPanel bottom) {
|
||||||
castlingButton.addActionListener((event) -> {
|
castlingButton.addActionListener((_) -> {
|
||||||
sendCommand(new CastlingCommand(false));
|
sendCommand(new CastlingCommand(false));
|
||||||
});
|
});
|
||||||
|
|
||||||
bigCastlingButton.addActionListener((event) -> {
|
bigCastlingButton.addActionListener((_) -> {
|
||||||
sendCommand(new CastlingCommand(true));
|
sendCommand(new CastlingCommand(true));
|
||||||
});
|
});
|
||||||
|
|
||||||
undoButton.addActionListener((event) -> {
|
undoButton.addActionListener((_) -> {
|
||||||
sendCommand(new UndoCommand());
|
sendCommand(new UndoCommand());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user