File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes trying to move a robot??????? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "trying to move a robot???????" Watch "trying to move a robot???????" New topic

trying to move a robot???????

Bob Holland

Joined: Dec 15, 2004
Posts: 7
argh!!! i jus dont have a clue as to what the heck im meant to be doing.

hears the deal, im meant to place another robot onto the maze thats allready there, and then guide him to the center. but i jus dont know where to start, heres what i was given:

public class MazeRunner{

* Constructor for objects of class MazeRunner
public MazeRunner(RobotWorld world){
//create a new robot and add to the world
Robot marvin = new Robot(1,1,1);

//add code here to get robot to meet the robot at the centre of the maze
//by using loops and the methods provided by the robot class

//for example

}//end constructor

}//end class


public class MazeLauncher {

* Application entry point, use to test main method
public static void main(String[] args) {
//DO NOT EDIT THIS CLASS, just use to test main method
RobotWorld world = RobotWorld.getDefaultRobotWorld();
world.resizeWorld(20, 15, 33);
Maze m = new Maze(world);

System.out.println("Press enter to let your robot find its way to the other robot in the centre");

MazeRunner mr = new MazeRunner(world);

System.out.println("Press enter to finish");


}//end main
}//end class

now im not at all asking anyone to complete this for me, i just would like to understand how im meant to place the robot, and get him to move???

please help me, this is really getting to me BoB
Nigel Browne
Ranch Hand

Joined: May 15, 2001
Posts: 673

The comments to your supplied code show you where to start. You should have a class called Robot, but you didn't post that, if it doesn't exist you will need to create one. Also your code mentioned a class called Maze, this hasn't been posted so you may need to write this class as well.
[ January 25, 2005: Message edited by: Nigel Browne ]
I agree. Here's the link:
subject: trying to move a robot???????
jQuery in Action, 3rd edition