/** The processus that create the Game and launch it. */ public static void createGame() { gameOfMunchkin = new Game(); tabOfPlayers = new Player[Munchkin.nbPlayer]; for (int i = 0; i < Munchkin.nbPlayer; i++) { String name = IHMPlayer.selectPseudo(); Player temp = new Player(name); tabOfPlayers[i] = temp; tabOfPlayers[i].asertId(i); } CreateHeapDungeon(); Collections.shuffle(gameOfMunchkin.getDungeonHeap().getDeck()); CreateHeapTreasure(); Collections.shuffle(gameOfMunchkin.getTreasureHeap().getDeck()); gameOfMunchkin.startGame(); }
/** * The execution of the application. * * @param args */ public static void main(String[] args) { System.out.println( "Bienvenue dans le Munchkin, nous allons procéder à la création d'une nouvelle partie."); nbPlayer = IHMPlayer.selectNbPlayers(); createGame(); }