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/22 18:54] frchrismake_a_maze [2020/08/18 18:59] frchris
Line 2: Line 2:
 Make a Maze with 4 to 6 walls and one beeper.  Place the Robot in the start position, and the beeper in the end position.  Make a Maze with 4 to 6 walls and one beeper.  Place the Robot in the start position, and the beeper in the end position. 
  
-You can post your .java file in [[https://drive.google.com/open?id=10dAqaHXdDkvM9kT7neze5SXVaUXAaqQe|Google classroom]].  If you want you can post it with or without the task that is the solution to your maze.+You can post your .java file in GoogleClassroom.  
  
-Make your plan and exchange it with another student.  He has to make your maze, and you have to make his.  Help one another.  Start with simplified task that turns off right after the robot is made.  After the maze is correct, you can finish the task by adding the ''move()'' and ''turnLeft()'' methods for the robot to run the maze.+Make your plan and exchange it with another student.  He has to make a task to run your maze, and you have to make a task to run his.  Help one another.  Start with simplified task that turns off right after the robot is made.  After the maze is correct, you can finish the task by adding the ''move()'' and ''turnLeft()'' methods for the robot to run the maze.
    
 Walls or obstacles are pared of the World class and can be placed in a NS or a EW direction, and have length.  Here is a link to the API which shows all the constructors and methods that belong to the [[http://csis.pace.edu/%7Ebergin/KarelJava2ed/KJRdocs/kareltherobot/World.html|World]] class. Walls or obstacles are pared of the World class and can be placed in a NS or a EW direction, and have length.  Here is a link to the API which shows all the constructors and methods that belong to the [[http://csis.pace.edu/%7Ebergin/KarelJava2ed/KJRdocs/kareltherobot/World.html|World]] class.
Line 59: Line 59:
 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>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.   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.  
 +
 +You can post world text file so others can run your maze with karel naming it (YourFirstName)Maze.txt - replacing (YourFirstName) of course.  for example, FrancisMaze.txt.  You can send it to the class inbox in [[https://drive.google.com/open?id=10dAqaHXdDkvM9kT7neze5SXVaUXAaqQe|Google classroom]].  If you want you can post it with or without the task that is the solution to your maze. This would be the sorce code file.  Name it YourFirstNameMaze.java
 +
 +[[Try Running these Student Made Mazes]]
make_a_maze.txt · Last modified: 2021/09/05 13:16 by frchris

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki