- Hello Explorer
- Walls
- Walls 2
- The Maze
-
Enemies - 16 Enemies
- Archers!
-
Seek out the Enemy - Attack and Retreat
Explorer API
Explorer methods
Explorer can do one action per turn.
Note: walk
, getSpace
, look
and poke
can each take in a direction parameter:
- Direction.RIGHT
- Direction.LEFT
- Direction.DOWN
- Direction.UP
If no Direction is passed in, they will default to Direction.RIGHT.
Mutators / ActionsExplorer 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:
look()
- Returns an Array of 3 Spaces in the designated Direction.getSpace()
- Returns the next Space on the board.getHealth()
- returns the value ofhealth
.
Space methods
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.
Enemies
Collapse Content
Show Content
Keep your friends close, but your enemies closer The Godfather
Watch out for Enemies! Pawns attack Explorers right near them. The Explorer can fight back with explorer.poke()
.
To check if the next Space is an enemy, you can use explorer.getSpace().isEnemy()
.
New Methods
Explorer
poke()
- Pokes the next space, causing damage to any Enemy there. You can also specify a direction to poke.
Space
isEnemy()
- returns true
if the Space contains an Enemy, and false
otherwise.
Challenge
Pass the enemies and reach the Goal!
Please sign in or sign up to submit answers.
Alternatively, you can try out Learneroo before signing up.