/** * The main method. Several options are listed - simply remove comments to use the option you * want. * * @param args the command line arguments */ public static void main(String[] args) { Executor exec = new Executor(); /* //run multiple games in batch mode - good for testing. int numTrials=10; exec.runExperiment(new RandomPacMan(),new RandomGhosts(),numTrials); */ /* //run a game in synchronous mode: game waits until controllers respond. int delay=5; boolean visual=true; exec.runGame(new RandomPacMan(),new RandomGhosts(),visual,delay); */ /// * // run the game in asynchronous mode. boolean visual = true; // exec.runGameTimed(new MyPacMan(),new MyGhostsV3(),visual); // exec.runGame(new MyPacMan(),new StarterGhosts(),visual, 5); // exec.runGame(new MyPacMan(),new AggressiveGhosts(),visual, 5); // exec.runGame(new MyPacMan(),new Legacy(),visual, 5); // exec.runGame(new MyPacMan(),new Legacy2TheReckoning(),visual, 5); exec.runGame(new MyPacMan(), new MyGhosts(), visual, 5); // exec.runGameTimed(new HumanController(new KeyBoardInput()),new MyGhosts(),visual); // */ String fileName = "replay.txt"; // exec.runGameTimedRecorded(new MyPacMan(),new StarterGhosts(),false,fileName); // exec.replayGame(fileName,visual); /* //run the game in asynchronous mode but advance as soon as both controllers are ready - this is the mode of the competition. //time limit of DELAY ms still applies. boolean visual=true; boolean fixedTime=false; exec.runGameTimedSpeedOptimised(new RandomPacMan(),new RandomGhosts(),fixedTime,visual); */ /* //run game in asynchronous mode and record it to file for replay at a later stage. boolean visual=true; String fileName="replay.txt"; exec.runGameTimedRecorded(new HumanController(new KeyBoardInput()),new RandomGhosts(),visual,fileName); //exec.replayGame(fileName,visual); */ }