Super IA (#5)

Reviewed-on: #5
Co-authored-by: Persson-dev <sim16.prib@gmail.com>
Co-committed-by: Persson-dev <sim16.prib@gmail.com>
This commit was merged in pull request #5.
This commit is contained in:
2025-04-30 18:28:01 +00:00
committed by Simon Pribylski
parent ecb0fdc623
commit 3b38e0da1f
26 changed files with 814 additions and 179 deletions

View File

@@ -1,7 +1,7 @@
package chess;
import chess.ai.DumbAI;
import chess.ai.HungryAI;
import chess.ai.AI;
import chess.ai.minimax.AlphaBetaAI;
import chess.controller.CommandExecutor;
import chess.controller.commands.NewGameCommand;
import chess.controller.event.GameAdaptator;
@@ -19,11 +19,14 @@ public class SwingMain {
Window window = new Window(commandExecutor, false);
commandExecutor.addListener(window);
DumbAI ai = new DumbAI(commandExecutor, Color.Black);
AI ai = new AlphaBetaAI(commandExecutor, Color.Black, 5);
commandExecutor.addListener(ai);
HungryAI ai2 = new HungryAI(commandExecutor, Color.White);
commandExecutor.addListener(ai2);
// AI ai2 = new AlphaBetaAI(commandExecutor, Color.White, 5);
// commandExecutor.addListener(ai2);
// Window window2 = new Window(ai2.getSimulation(), false);
// ai2.getSimulation().addListener(window2);
commandExecutor.addListener(new GameAdaptator(){
@Override