Package g54327.humbug.model.Animals.Type
Interface Terrestrial
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default Position
step(Position actualPosition, Direction direction, int nSquares, Board board, Animal[] animals)
Returns next position after move.
-
-
-
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 positiondirection
- Direction of movenSquares
- number of Squares to moveboard
- Boardanimals
- Animals- Returns:
- Next position of the Animal
-
-