package fr.iut_fbleau.Avalam; import fr.iut_fbleau.GameAPI.AbstractGame; import fr.iut_fbleau.GameAPI.AbstractGamePlayer; import fr.iut_fbleau.GameAPI.IBoard; import fr.iut_fbleau.GameAPI.Player; import java.util.EnumMap; /** * Classe pour jouer une partie entre deux bots sans interface graphique. * Utilisée dans le mode Arène. */ public class ArenaGame extends AbstractGame { /** * Construit une partie Arène entre deux bots. * * @param board plateau initial * @param bot1 bot pour PLAYER1 * @param bot2 bot pour PLAYER2 */ public ArenaGame(IBoard board, AbstractGamePlayer bot1, AbstractGamePlayer bot2) { super(board, createPlayerMap(bot1, bot2)); } /** * Crée la map des joueurs pour AbstractGame. */ private static EnumMap createPlayerMap( AbstractGamePlayer bot1, AbstractGamePlayer bot2) { EnumMap map = new EnumMap<>(Player.class); map.put(Player.PLAYER1, bot1); map.put(Player.PLAYER2, bot2); return map; } }