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 class
PacManSimulator.GameConfig
-
Constructor Summary
Constructors Constructor Description PacManSimulator()
-
Method Summary
Modifier and Type Method Description static void
main(java.lang.String[] args)
static Game
play(IPacManController pacMan)
Run simulation visualized w/o ghosts.static Game
play(IPacManController pacMan, IGhostsController ghosts)
static Game
play(IPacManController pacMan, IGhostsController ghosts, int seed, int lives, int thinkTime)
Run simulation visualized with ghosts.static Game
play(SimulatorConfig config)
Run simulation according to the configuration.Game
run(SimulatorConfig config)
static Game
simulate(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)
-