refactor: add signals to alphabetaai
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
package chess;
|
||||
|
||||
import chess.ai.minimax.AlphaBetaAI;
|
||||
import chess.ai.minimax.AlphaBetaConsolePrinter;
|
||||
import chess.controller.CommandExecutor;
|
||||
import chess.controller.commands.NewGameCommand;
|
||||
import chess.controller.event.GameAdaptator;
|
||||
import chess.model.Color;
|
||||
import chess.model.Game;
|
||||
import chess.pgn.PgnExport;
|
||||
import chess.view.audio.GameAudio;
|
||||
@@ -16,8 +19,11 @@ public class SwingMain {
|
||||
Window window = new Window(commandExecutor, true);
|
||||
commandExecutor.addListener(window);
|
||||
|
||||
// AI ai = new AlphaBetaAI(commandExecutor, Color.Black, 5);
|
||||
// commandExecutor.addListener(ai);
|
||||
AlphaBetaAI ai = new AlphaBetaAI(commandExecutor, Color.Black, 5);
|
||||
commandExecutor.addListener(ai);
|
||||
|
||||
AlphaBetaConsolePrinter aiResults = new AlphaBetaConsolePrinter(ai);
|
||||
aiResults.connect();
|
||||
|
||||
// AI ai2 = new AlphaBetaAI(commandExecutor, Color.White, 5);
|
||||
// commandExecutor.addListener(ai2);
|
||||
|
||||
Reference in New Issue
Block a user