Package com.takenoko.actors
Class Actor
java.lang.Object
com.takenoko.actors.Actor
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Map<PositionVector,LayerBambooStack> booleangetPossibleMoves(Board board) Returns possible moves for the actor.inthashCode()protected booleanisMovePossible(PositionVector vector, Board board) Check if the move is possible.move(PositionVector vector, Board board) Move the panda with a vector and try to eat bamboo.
-
Field Details
-
position
PositionVector position
-
-
Constructor Details
-
Actor
-
-
Method Details
-
getPosition
- Returns:
- the position of the actor
-
isMovePossible
Check if the move is possible. The actor can only move in a straight line on the board tiles.- Parameters:
vector- the vector to move the actor- Returns:
- true if the move is possible, false otherwise
-
getPossibleMoves
Returns possible moves for the actor.- Returns:
- the possible moves
-
move
Move the panda with a vector and try to eat bamboo.- Parameters:
vector- the vector to move the panda
-
afterMove
-
equals
-
hashCode
public int hashCode() -
getPositionVector
-