definable size for arena

This commit is contained in:
vaisse
2026-02-06 11:25:47 +01:00
parent e0a2c2642a
commit c278b18872
3 changed files with 16 additions and 3 deletions

View File

@@ -4,7 +4,11 @@ import fr.iut_fbleau.GameAPI.Player;
public class ArenaMain {
public static void main(String[] args) {
Arena arena = new Arena();
int size = 7;
if (args.length >= 1) {
try { size = Integer.parseInt(args[0]); } catch (NumberFormatException ignored) {}
}
Arena arena = new Arena(size);
arena.addBot(new RandomBot(Player.PLAYER1, 12345L)); // Correct constructor usage
arena.addBot(new MiniMaxBot(Player.PLAYER2));
arena.addBot(new HeuristicBot(Player.PLAYER1));