Package game
Class PacManSimulator
java.lang.Object
game.PacManSimulator
public class PacManSimulator
extends java.lang.Object
One simulator can run one instance of PacMan-vs-Ghosts game.
Can be used for both head/less games.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPacManSimulator.GameConfig -
Constructor Summary
Constructors Constructor Description PacManSimulator() -
Method Summary
Modifier and Type Method Description static voidmain(java.lang.String[] args)static Gameplay(IPacManController pacMan)Run simulation visualized w/o ghosts.static Gameplay(IPacManController pacMan, IGhostsController ghosts)static Gameplay(IPacManController pacMan, IGhostsController ghosts, int seed, int lives, int thinkTime)Run simulation visualized with ghosts.static Gameplay(SimulatorConfig config)Run simulation according to the configuration.Gamerun(SimulatorConfig config)static Gamesimulate(IPacManController pacMan, IGhostsController ghosts)Run simulation headless.
-
Constructor Details
-
PacManSimulator
public PacManSimulator()
-
-
Method Details
-
run
-
play
Run simulation according to the configuration.- Parameters:
config-- Returns:
-
play
public static Game play(IPacManController pacMan, IGhostsController ghosts, int seed, int lives, int thinkTime)Run simulation visualized with ghosts.- Parameters:
pacMan-ghosts-- Returns:
-
play
-
play
Run simulation visualized w/o ghosts.- Parameters:
pacMan-ghosts-- Returns:
-
simulate
Run simulation headless.- Parameters:
pacMan-ghosts-- Returns:
-
main
public static void main(java.lang.String[] args)
-