make_a_maze
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
make_a_maze [2019/08/17 11:47] – [3 Ways to Make Walls] frchris | make_a_maze [2019/08/22 18:59] – frchris | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Make a Maze ====== | ====== Make a Maze ====== | ||
- | Make a Maze with 4 to 6 walls and one beeper. | + | Make a Maze with 4 to 6 walls and one beeper. |
+ | |||
+ | You can post your .java file in [[https:// | ||
+ | |||
+ | Make your plan and exchange it with another student. | ||
Walls or obstacles are pared of the World class and can be placed in a NS or a EW direction, and have length. | Walls or obstacles are pared of the World class and can be placed in a NS or a EW direction, and have length. | ||
World.setSize(int numberOfStreets, | World.setSize(int numberOfStreets, | ||
+ | |||
+ | It is actually easier to see the available methods and their parameters in the [[http:// | ||
====== 3 Ways to Make Walls ====== | ====== 3 Ways to Make Walls ====== | ||
- World.placeNSWall(), | - World.placeNSWall(), | ||
- | public class Walls implements Directions { | + | public class Maze implements Directions { |
public static void task() { | public static void task() { | ||
Robot robby = new Robot(1, 2, East, 0); | Robot robby = new Robot(1, 2, East, 0); | ||
Line 52: | Line 58: | ||
eastwestwalls 3 1 3 | eastwestwalls 3 1 3 | ||
northsouthwalls 1 6 5 | northsouthwalls 1 6 5 | ||
- | eastwestwalls 6 1 6</ | + | eastwestwalls 6 1 6</ |
+ | |||
+ | You can post world text file so others can run your maze with karel naming it (YourFirstName)Maze.txt - replacing (YourFirstName) of course. |
make_a_maze.txt · Last modified: 2021/09/05 13:16 by frchris