Installing and Using GridWorld
- Go to http://apcentral.collegeboard.com/apc/public/courses/teachers_corner/151155.html and Click on the File called Code (zip/Code 238K)
-
There are directions below on the page for the installation if you need them
- Open the zipped source code file for GridWorld and extract the files to your DeskTop. This will create a folder called GridWorldCode on your DeskTop. (if it doesn't show up in your desktop, find it, cut it and paste it to your desktop)
- The GridWorld code is packaged in a JAR (Java Archive) file. To use this with BlueJ we must do the following:
- Open BlueJ.
- Select Tools > Preferences > Libraries and click on the "Add" button.
- Browse to the deskTop\GridWorldCode folder and select the gridworld.jar file
- Click Open and then OK two times .
- GridWorld projects are Non-BlueJ projects. To open select Project > Open Non BlueJ and browse to the GridWorldCode\projects folder.
- Select the firstProject folder and click on "Open in BlueJ". (Note: Do NOT enter the firstProject folder...just select it).
- Compile the BugRunner class.
- The main() method starts the GridWorld program. Right-click on the BugRunner class and select void main(). You do not need to supply any arguments.
- The GridWorld program will open in a new window (maybe behind BlueJ!!)
-
Once you stop it you can open up the file and look at the code. Add another rock, and add another bug.