Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Himai Minh

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

Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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 ]
Who knew that furniture could be so violent? Put this tiny ad out there to see what happens:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
    Bookmark Topic Watch Topic
  • New Topic