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 GhostsActionsgetActions()ReturnGhostsActionscontaining Ghosts decision, what to do next.intgetGhostCount()How many ghosts (0-4) this controller control.int[]getLocations(Game game)voidnextLevel(Game game)Level has been changed!voidreset(Game game)Resets the controller before game starts.voidtick(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:IGhostsControllerHow many ghosts (0-4) this controller control.- Specified by:
getGhostCountin interfaceIGhostsController- Returns:
-
reset
Description copied from interface:IGhostsControllerResets the controller before game starts.- Specified by:
resetin interfaceIGhostsController- Parameters:
game- initial state of the game
-
nextLevel
Description copied from interface:IGhostsControllerLevel has been changed!- Specified by:
nextLevelin interfaceIGhostsController
-
tick
Description copied from interface:IGhostsControllerPerform action-selection for all ghosts based on information fromGame.
Persist your decision withinPacManActionthat is periodically read via#getAction().- Specified by:
tickin 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:IGhostsControllerReturnGhostsActionscontaining Ghosts decision, what to do next.- Specified by:
getActionsin interfaceIGhostsController- Returns:
-