Hello Explorer
Collapse Content
Show Content
You are in charge of a robot, the Java Explorer, which will be on its own in a dangerous world. In each challenge, you need to fill in the Java method play
, which will be invoked on every turn of the game. The Explorer will be able to do one action each turn.
The First area consists of 8 cells, with the Explorer (♖) at one end, and the Goal (☆) at the other:
♖......☆
Currently explorer
can only do one action, walk forward. To get started write explorer.walk();
in the play
method below.
Explorer methods
walk()
- Moves the explorer forward (to the right) one Space.
Challenge
Get the Explorer to the Goal!
Please sign in or sign up to submit answers.
Alternatively, you can try out Learneroo before signing up.
Comments
Kendall Ponder
Jun 9, 12:38 PMI don't find these challenges very well defined. What does it mean to move the robot one space to the right? Is there an 8 cell array called First? If so, how is the position of the explorer
marked? How do I access this space (explorer.space ?)? Am I supposed to do graphics? If so, I missed the instructions on how to do graphics.
Learneroo
Jun 9, 12:41 PMThe idea is to pick it up as you go through it. This first challenge tells you the code you need to write to pass it. Which challenge do you get stuck on?
Kendall Ponder
Jun 9, 1:16 PMexplorer.walk() is supposed to move the explorer one space to the right but the instructions don't define what moving to the right means. Do I just define it any way I want? As I said in the
original comment is there an 8 cell array called First? If so, how is the position of the explorer marked? How do I access this space (explorer.space ?)? Am I supposed to do graphics? If so, I missed the instructions on how to do graphics.
thales
Jul 14, 9:13 AMi dont understand what to do either?
thales
Jul 14, 9:23 AMI did not get this at all, but all you had to do was type in:
explorer.walk();
but i still don't get the idea. the walking method already existed i guess? i dont get it.
Learneroo
Jul 14, 9:47 AMYes, you're using the
explorer
class which comes with methods that are described to you (in this casewalk
). A program takes your code, runs it on the game simulator and checks if the explorer reaches the goal.catypus
Jul 5, 5:37 AM"To get started write explorer.walk(); in the play method below."
All you have to do is follow those intstructions there. Yeah I somehow missed this very simple instruction when I first read it over too! But its super easy, you can do it