poke can each take in a direction parameter:
If no Direction is passed in, they will default to Direction.RIGHT.Mutators / Actions
Explorer can do one action per turn.
walk()- Moves the explorer forward (to the right) one Space.
poke()- Pokes the next space, causing damage to any Enemy there.
recharge()- Adds 9 to health.
Accessors:Note that look() and lookAround() can include null cells.
look()- Returns an Array of 3 Spaces in the designated Direction.
lookAround()- Returns an 7x7 Array of Spaces with the Explorer in the center.
getSpace()- Returns the next Space on the board.
getHealth()- returns the value of
isEnemy()- returns true if the Space contains an Enemy, and false otherwise.
isKnight()- returns true if the Space contains a Knight, and false otherwise.
isArcher()- returns true if the Space contains an Archer, and false otherwise.
isWall()- returns true if the Space contains a Wall, and false otherwise.
Premium Content - Free Preview
There is nothing impossible to him who will try. Alexander the Great
Note that the explorer can also
lookAround() returns a 7x7 array of Spaces with the explorer at the center of it. Use this information to navigate the battlefield!