Package game.controllers.pacman
Interface IPacManController
- All Known Implementing Classes:
HumanPacMan,MyPacMan,NearestPillPacMan,NearestPillPacManVS,PacManControllerBase,PacManHijackController,PacmanOnly,RandomNonRevPacMan,RandomPacMan,Replay.ReplayMsPacman
public interface IPacManController
Controller of Ms Pac-Man.
Action-selection should happen in
Action-selection should happen in
tick(Game, long)
while getAction() should return just the result of the decision.-
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.voidtick(Game game, long timeDue)Perform action-selection based on information fromGame.
-
Method Details
-
reset
Resets the controller before game starts.- Parameters:
game- initial state of the game
-
nextLevel
Level has been changed!- Parameters:
game-
-
tick
Perform action-selection based on information fromGame.
Persist your decision withinPacManActionthat is periodically read viagetAction().- Parameters:
game- current state of the gametimeDue- how much time (in millis) do you have for your action-selection beforegetAction()will get called.
-
killed
void killed()MS PacMan has been just eaten by a ghost. -
getAction
PacManAction getAction()ReturnPacManActioncontaining Ms Pac-Man decision, what to do next.- Returns:
-