Java Explorer Comments
Comments
-
The 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?
-
explorer.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.
-
i dont understand what to do either?
-
I 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.
-
Yes, 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. -
"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
-
I can only poke, recharge or move once each turn. I am taking too long and dying with the same code so if I recharge less I will just die quicker or if I recharge more I will take longer. What am I missing?
-
You need to recharge enough to defeat the second enemy, but not too much. The Pawn had 40 energy to start off with.
-
Based on the raw output it looks like the pawn is getting recharged also.
-
The first two pawns took 4 pokes to kill but the third one is still alive after 11 pokes.
-
@Kendall's Explorer, never recharge while getting poked or you'll die slowly.
-
I've been fighting hard with this one, can't get it.
How do I use a variable (lasthealth) without clobbering it's data every time the play method is called.
I want to update lasthealth at the bottom of the play method... check it when its called again... but I can't check it without declaring it at the start... which ruins the value its holding on to
-
You can create the health variable outside the play method. Then you can update it's value as needed inside the method.
-
I keep getting
Main.java:519: error: incompatible types: Player.Direction cannot be converted to Direction
explorer.walk(Direction.LEFT);But I added the enum Direction{ LEFT, RIGHT} like it says in the explanation.
What can I do here?
-
Note that the enum is already included with code that is attached your code. So you do not need to declare the enum yourself and can just use it inside your code. (You should just fill in the class Player.)
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.