User Tools

Site Tools


make_a_maze

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
make_a_maze [2019/08/17 11:47] – [3 Ways to Make Walls] frchrismake_a_maze [2019/08/18 12:37] – [Make a Maze] frchris
Line 5: Line 5:
  
 World.setSize(int numberOfStreets, int numberOfAvenues) will change the size of the World. World.setSize(int numberOfStreets, int numberOfAvenues) will change the size of the World.
 +
 +It is actually easier to see the available methods and their parameters in the [[http://csis.pace.edu/%7Ebergin/KarelJava2ed/KJRdocs/index.html|API]]
  
 ====== 3 Ways to Make Walls ====== ====== 3 Ways to Make Walls ======
Line 52: Line 54:
 eastwestwalls 3 1 3 eastwestwalls 3 1 3
 northsouthwalls 1 6 5 northsouthwalls 1 6 5
-eastwestwalls 6 1 6</code>Give the text a file a name (like ''maze.txt'') , and add it to your project and use the call <code java> World.readWorld("maze.txt"); </code>+eastwestwalls 6 1 6</code>Give the text a file a name (like ''maze.txt'') , and add it to your project and use the call <code java> World.readWorld("maze.txt"); </code>This way has extra steps, but once you make this text file, you can easily send your maze to someone else and have them figure out a way to navigate it.  You can actually use the first method, and then use the method call ''World.saveWorld("myMaze.txt");'' to make this text file.  
make_a_maze.txt · Last modified: 2021/09/05 13:16 by frchris

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki