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 tick(Game, long) while getAction() should return just the result of the decision.
  • Method Summary

    Modifier and Type Method Description
    PacManAction getAction()
    Return PacManAction 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 from Game.
  • Method Details

    • reset

      void reset​(Game game)
      Resets the controller before game starts.
      Parameters:
      game - initial state of the game
    • nextLevel

      void nextLevel​(Game game)
      Level has been changed!
      Parameters:
      game -
    • tick

      void tick​(Game game, long timeDue)
      Perform action-selection based on information from Game.

      Persist your decision within PacManAction that is periodically read via getAction().
      Parameters:
      game - current state of the game
      timeDue - how much time (in millis) do you have for your action-selection before getAction() will get called.
    • killed

      void killed()
      MS PacMan has been just eaten by a ghost.
    • getAction

      PacManAction getAction()
      Return PacManAction containing Ms Pac-Man decision, what to do next.
      Returns: