add hungry ai

This commit is contained in:
2025-04-17 08:53:21 +02:00
parent 17ef882d44
commit 30eb12145d
3 changed files with 123 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
package chess;
import chess.ai.DumbAI;
import chess.ai.HungryAI;
import chess.controller.CommandExecutor;
import chess.controller.commands.NewGameCommand;
import chess.controller.event.GameAdaptator;
@@ -20,7 +21,7 @@ public class SwingMain {
DumbAI ai = new DumbAI(commandExecutor, Color.Black);
commandExecutor.addListener(ai);
DumbAI ai2 = new DumbAI(commandExecutor, Color.White);
HungryAI ai2 = new HungryAI(commandExecutor, Color.White);
commandExecutor.addListener(ai2);
commandExecutor.addListener(new GameAdaptator(){