Watch out for Archers, who can shoot from far..
Archers can attack
explorer from far without being detected. Store an instance variable for health to see if your current health value (from
getHealth()) is less than before. Don't waste time recharging while being attacked!
Don't take more than 35 moves to reach the goal.
As your code gets more complicated, it will help to create additional methods instead of keeping everything in nested if-then blocks.
getSpace()- Returns the next Space on the board.
getHealth()- returns the value of
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.
isEnemy()- returns true if the Space contains an Enemy, and false otherwise.