| CSC 8310 Java Adventure Assignment David Matuszek, Villanova University, Summer 2001 |
In the Prolog assignment, I gave you a simple (boring) adventure game, and you were asked to turn it into a more interesting game
Once again, I'm giving you a simple (boring) adventure game, this time in Java. But what I'm asking you to do is completely different.
I've written the program as a BlueJ package, and zipped it up. Download the file adventure.ZIP and unzip it. You can open this package directly from BlueJ.
If you want to use JBuilder, Visual Age, or Forté instead of BlueJ,
that's OK. (J++ is not OK.) In this case, your readme.txt
file should tell which IDE you used. If you can't start the program just by
typing java Game in the MS-DOS window, you must also provide
instructions on how to start your program.
The GUI that I've provided is a very simple one; you type in commands at the bottom, and the transcript (commands and results) appears in the rest of the window. It looks something like this:

Your task is to add Components (such as Lists and Buttons) to this GUI, so that you can do most operations just by pointing and clicking, rather than typing in commands. (But keep the ability to type in commands.)
My GUI for doing this looks like:

In this GUI:
Your GUI does not need to look exactly like this!
Create several more items and add them to the game, so that you have something to display in your You see: and You are holding: lists. Add a few more rooms and paths between rooms, for much the same reason. You don't have to do anything complicated with the things and paths; they are just for testing your GUI.
The program has a Neandertal (cave man) class, and I've created
a Neandertal for you. His name is Gorgo, but feel free to change that if you
don't like the name.
A Neandertal will wander around and do things by himself/herself, but you have
to get him started. All the hard work has already been done for you. All you
need to do is create a separate Thread for your Neandertal, and every ten or
fifteen seconds have your Neandertal doSomething().
look command (20 points)The command look will tell you if Gorgo is nearby, but the commands
look Neandertal and look Gorgo don't see anything
(they only tell you about Things, and Gorgo isn't a Thing).
Fix it so that these commands work.
Provide both a text command and a Button for saving the transcript to a text file. If you look carefully at the program, you will find that all the hard work has already been done.
If you want to turn this into an interesting adventure game, feel free (but be sure to tell us that you've done so!).
readme.txt file. You can do this
from within BlueJ by clicking on the text icon in the project window.javadoc documentation for
this program useful. You can see it from within BlueJ by choosing Interface
rather than Implementation in any class window. @author tag (but you should
keep mine) in each of the classes that you modify.Due date: July 5. Please turn in a floppy with everything on it, including all necessary compiled code. Please do not turn in any paper. Please do not e-mail your assignment to me without a very good reason.