almost working

This commit is contained in:
2025-04-18 18:42:28 +02:00
parent b83726925e
commit 4a58136afe
12 changed files with 232 additions and 16 deletions

View File

@@ -1,5 +1,6 @@
package chess;
import chess.ai.AlphaBetaAI;
import chess.ai.DumbAI;
import chess.ai.HungryAI;
import chess.controller.CommandExecutor;
@@ -18,12 +19,15 @@ public class SwingMain {
Window window = new Window(commandExecutor, false);
commandExecutor.addListener(window);
DumbAI ai = new DumbAI(commandExecutor, Color.Black);
DumbAI ai = new DumbAI(commandExecutor, Color.White);
commandExecutor.addListener(ai);
HungryAI ai2 = new HungryAI(commandExecutor, Color.White);
AlphaBetaAI ai2 = new AlphaBetaAI(commandExecutor, Color.Black, 3);
commandExecutor.addListener(ai2);
// Window window2 = new Window(ai2.getSimulation(), false);
// ai2.getSimulation().addListener(window2);
commandExecutor.addListener(new GameAdaptator(){
@Override
public void onGameEnd() {