Package game.core
Class Replay.ReplayMsPacman
java.lang.Object
game.core.Replay.ReplayMsPacman
- All Implemented Interfaces:
IPacManController
- Enclosing class:
- Replay
public class Replay.ReplayMsPacman extends java.lang.Object implements IPacManController
-
Constructor Summary
Constructors Constructor Description ReplayMsPacman() -
Method Summary
Modifier and Type Method Description PacManActiongetAction()ReturnPacManActioncontaining Ms Pac-Man decision, what to do next.intgetLocation(Game game)voidkilled()MS PacMan has been just eaten by a ghost.voidnextLevel(Game game)Level has been changed!voidreset(Game game)Resets the controller before game starts.voidtick(Game game, long timeDue)Perform action-selection based on information fromGame.
-
Constructor Details
-
ReplayMsPacman
public ReplayMsPacman()
-
-
Method Details
-
reset
Description copied from interface:IPacManControllerResets the controller before game starts.- Specified by:
resetin interfaceIPacManController- Parameters:
game- initial state of the game
-
nextLevel
Description copied from interface:IPacManControllerLevel has been changed!- Specified by:
nextLevelin interfaceIPacManController
-
tick
Description copied from interface:IPacManControllerPerform action-selection based on information fromGame.
Persist your decision withinPacManActionthat is periodically read viaIPacManController.getAction().- Specified by:
tickin interfaceIPacManController- Parameters:
game- current state of the gametimeDue- how much time (in millis) do you have for your action-selection beforeIPacManController.getAction()will get called.
-
killed
public void killed()Description copied from interface:IPacManControllerMS PacMan has been just eaten by a ghost.- Specified by:
killedin interfaceIPacManController
-
getLocation
-
getAction
Description copied from interface:IPacManControllerReturnPacManActioncontaining Ms Pac-Man decision, what to do next.- Specified by:
getActionin interfaceIPacManController- Returns:
-