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 PacManAction
getAction()
ReturnPacManAction
containing Ms Pac-Man decision, what to do next.void
killed()
MS PacMan has been just eaten by a ghost.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 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 withinPacManAction
that 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()ReturnPacManAction
containing Ms Pac-Man decision, what to do next.- Returns:
-