Package game.core
Class Replay.ReplayGhosts
java.lang.Object
game.core.Replay.ReplayGhosts
- All Implemented Interfaces:
IGhostsController
- Enclosing class:
- Replay
public class Replay.ReplayGhosts extends java.lang.Object implements IGhostsController
-
Constructor Summary
Constructors Constructor Description ReplayGhosts(int ghostCount)
-
Method Summary
Modifier and Type Method Description GhostsActions
getActions()
ReturnGhostsActions
containing Ghosts decision, what to do next.int
getGhostCount()
How many ghosts (0-4) this controller control.int[]
getLocations(Game game)
void
nextLevel(Game game)
Level has been changed!void
reset(Game game)
Resets the controller before game starts.void
tick(Game game, long timeDue)
Perform action-selection for all ghosts based on information fromGame
.
-
Constructor Details
-
ReplayGhosts
public ReplayGhosts(int ghostCount)
-
-
Method Details
-
getGhostCount
public int getGhostCount()Description copied from interface:IGhostsController
How many ghosts (0-4) this controller control.- Specified by:
getGhostCount
in interfaceIGhostsController
- Returns:
-
reset
Description copied from interface:IGhostsController
Resets the controller before game starts.- Specified by:
reset
in interfaceIGhostsController
- Parameters:
game
- initial state of the game
-
nextLevel
Description copied from interface:IGhostsController
Level has been changed!- Specified by:
nextLevel
in interfaceIGhostsController
-
tick
Description copied from interface:IGhostsController
Perform action-selection for all ghosts based on information fromGame
.
Persist your decision withinPacManAction
that is periodically read via#getAction()
.- Specified by:
tick
in interfaceIGhostsController
- Parameters:
game
- current state of the gametimeDue
- how much time (in millis) do you have for your action-selection before#getAction()
will get called.
-
getLocations
-
getActions
Description copied from interface:IGhostsController
ReturnGhostsActions
containing Ghosts decision, what to do next.- Specified by:
getActions
in interfaceIGhostsController
- Returns:
-