User Tools

Site Tools


mazewalker

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
mazewalker [2019/08/29 23:52]
frchris
mazewalker [2019/08/29 23:59] (current)
frchris
Line 32: Line 32:
     /**     /**
      * This will move the Robot according to the diagram      * This will move the Robot according to the diagram
-     ​* ​mentioned.+     ​* ​above Use if () else statements to handle the 4 cases
      */      */
  public void followRightWall() ​  public void followRightWall() ​
Line 46: Line 46:
 } }
 </​code>​ </​code>​
 +
  
 First use the ''​MazeWalkerTester''​ to see if your code deals with the four situations correctly. First use the ''​MazeWalkerTester''​ to see if your code deals with the four situations correctly.
Line 55: Line 56:
 {{ ::​mazewalkerrunner.java |MazeWalkerRunner.java}} {{ ::​mazewalkerrunner.java |MazeWalkerRunner.java}}
  
 +Hints:
 +  * Case One check: is the front clear?
 +  * Case 2,3,4 you can move
 +  * Case 2 versus case 3,4: is there a wall on the right?
 +  * In case 3 and 4 you can move to the right.
 +  * Case 3 versus case 4: is there a wall on the right?
mazewalker.txt ยท Last modified: 2019/08/29 23:59 by frchris