begin pgn

This commit is contained in:
2025-04-14 11:21:30 +02:00
parent 3bea2eeb2d
commit d8c927083a
2 changed files with 39 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
package chess.pgn;
import chess.controller.CommandExecutor;
import chess.controller.commands.NewGameCommand;
import chess.controller.event.GameAdaptator;
import chess.model.ChessBoard;
import chess.model.Game;
import chess.simulator.FoolCheckMate;
import chess.view.consolerender.Console;
public class PgnExport {
public static void main(String[] args) {
final Game game = new Game(new ChessBoard());
final CommandExecutor commandExecutor = new CommandExecutor(game);
FoolCheckMate checkMate = new FoolCheckMate(commandExecutor);
commandExecutor.addListener(checkMate);
commandExecutor.addListener(new GameAdaptator() {
@Override
public void onGameEnd() {
System.out.println(exportGame(game));
commandExecutor.close();
}
});
commandExecutor.executeCommand(new NewGameCommand());
}
public static String exportGame(Game game) {
return "coucou";
}
}