Class Game

  • All Implemented Interfaces:
    Model

    public class Game
    extends Object
    implements Model
    Game class
    Since:
    0.2.0
    Version:
    1.1.0
    Author:
    Andrew SASSOYE
    • Constructor Detail

      • Game

        public Game()
    • Method Detail

      • getBoard

        public Board getBoard()
        this.board getter
        Specified by:
        getBoard in interface Model
        Returns:
        this.board
      • getAnimals

        public Animal[] getAnimals()
        this.animals getter
        Specified by:
        getAnimals in interface Model
        Returns:
        this.animals
      • getRemainingMoves

        public int getRemainingMoves()
        this.remainingMoves getter
        Specified by:
        getRemainingMoves in interface Model
        Returns:
        this.remainingMoves
      • startLevel

        public void startLevel​(int nlevel)
        Start a given level
        Specified by:
        startLevel in interface Model
        Parameters:
        nlevel - Level to start.
      • getLevelStatus

        public LevelStatus getLevelStatus()
        Checks the level status
        Specified by:
        getLevelStatus in interface Model
        Returns:
        Actual status
      • move

        public void move​(Position position,
                         Direction direction)
        Move an animal at a given position to a given direction.
        Specified by:
        move in interface Model
        Parameters:
        position - Position of the Animal
        direction - Direction to move the Animal