Interface Terrestrial

  • All Known Implementing Classes:
    Ladybird, Snail, Spider

    public interface Terrestrial
    Terrestrial interface
    Since:
    2.0.0
    Version:
    1.0.0
    Author:
    Andrew SASSOYE
    • Method Detail

      • step

        default Position step​(Position actualPosition,
                              Direction direction,
                              int nSquares,
                              Board board,
                              Animal[] animals)
        Returns next position after move. If Animal is present at destination or if a wall is present the animal stops moving
        Parameters:
        actualPosition - Actual animal position
        direction - Direction of move
        nSquares - number of Squares to move
        board - Board
        animals - Animals
        Returns:
        Next position of the Animal