My Oh Mine
Watch out for the Mine! If
explorer steps on an active mine it will die!
The Java world consists of separate
explorer must navigate. Most
Spaces are empty, but some have dangerous occupants. You can use
explorer.getSpace() to get the next Space.
Space has a method:
.isMine() to tell you if it contains an active mine.
You can use
explorer.poke() to poke the next Space. A mine will explode when poked.
You can only invoke one mutator method per turn. A mutator is a method that changes something, as opposed to just returning a value.
getSpace()- Returns the next Space on the board.
walk()- Moves the explorer forward (to the right) one Space.
poke()- Pokes the next space.
.isMine() - returns true if this Space contains a Mine, and false otherwise.
Clear the mine and reach the goal!
Please sign in or sign up to submit answers.
Alternatively, you can try out Learneroo before signing up.