Package game.controllers.pacman
Class PacManControllerBase
java.lang.Object
game.controllers.pacman.PacManControllerBase
- All Implemented Interfaces:
IPacManController
- Direct Known Subclasses:
PacManHijackController
public abstract class PacManControllerBase extends java.lang.Object implements IPacManController
-
Field Summary
-
Constructor Summary
Constructors Constructor Description PacManControllerBase() -
Method Summary
Modifier and Type Method Description PacManActiongetAction()ReturnPacManActioncontaining Ms Pac-Man decision, what to do next.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.abstract voidtick(Game game, long timeDue)Perform action-selection based on information fromGame.
-
Field Details
-
Constructor Details
-
PacManControllerBase
public PacManControllerBase()
-
-
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
-
getAction
Description copied from interface:IPacManControllerReturnPacManActioncontaining Ms Pac-Man decision, what to do next.- Specified by:
getActionin interfaceIPacManController- Returns:
-