Due date: Thursday, April 13. I will accept assignments submitted throughout the Easter weekend without late penalty, though.
You are to add two new puzzles, each with at least one (probably only one) special class extending Room. At least one puzzle should involve a new command word (don't forget to add it to CommandWords.java!!) You will also have to make minor changes to the Game class to patch your new rooms (and other rooms) into the game. Try not to change the basic Game/Room interface.
Team Option: You may pair up with a classmate and do your project together. In that case, you should have three new puzzle rooms.
In either case, you are to add enough plain Rooms, and enough description, to produce a playable game. Your new rooms should follow a reasonably sensible "map".
You will be graded in part on the inventiveness and originality of your puzzles. Adding a superclass of Item (as in the Locked Room example, #1 below) is not required, but can sometimes lead to cleverer puzzles. Here are a few possible examples:
1. Locked room. The command UNLOCK DOOR works only if you have the CORRECT key. You define a class Key extends Item {...}. Keys have some kind of (numeric) attribute that allows the game to determine which key is correct, though the number isn't visible to the player.
2. Room with heavy stone. The commands are MOVE STONE, EAT COOKIE. Sample play transcript:
You have entered a room with a huge stone in the center.
It looks like it might be covering something.
MOVE STONE
You are too weak and hungry to move the stone.
EAT COOKIE
Wow! That made you feel stronger!
MOVE STONE
Filled with a burst of strength, you move the stone.
A moneybag is revealed.
3. Dragon's room, from which escape is blocked until you defeat or befriend the dragon.
Note the "advance warning" here that, well, you'll need to find the SWORD first.
GO NORTH
The passage is littered with bones. A dragon's roar splits the air.
I hope you have a weapon!
<<... go back and GET SWORD...>>
GO NORTH
You have entered the lair of the dragon. His tail flicks behind you
and the exit door latches closed.
GO SOUTH
the dragon won't let you out
ATTACK DRAGON
The dragon is injured!
ATTACK DRAGON
The dragon dies!
GO SOUTH
The passage is littered with bones.
GO NORTH
You have entered the lair of the dragon.
His dead body lies before you.
Exits: south north
GO NORTH
You have entered the dragon's treasury
4. Buried treasure
GO EAST
You are on a sandy beach. An X is drawn on the sand.
DIG
You don't have a shovel
<< go back and GET SHOVEL..>>
GO EAST
You are on a sandy beach. An X is drawn on the sand.
DIG
A locked treasure chest is revealed!
TAKE CHEST
You can't take that!
UNLOCK CHEST
You don't have the key ...
<< go back and GET KEY..>>
UNLOCK CHEST
A necklace is revealed; it appears to be made of diamonds.
TAKE NECKLACE
5. Taking an exam. You have to study and eat first, though! Note that the studying (and eating)
is done in the hallway here. Both hallway and examroom are "special",
but with a little thought they can be the same class (as in the ValveRoom example).
This is probably the hardest puzzle illustrated here.
GO NORTH
You have entered a classroom. An exam is about to begin.
TAKE EXAM
Are you sure? You naven't studied and you're too hungry.
GO SOUTH
You're in the hall by your locker. The following things are here: BOOK SANDWICH
READ BOOK
Kant's _Categorical Imperative_ is dense reading, but finally you get what he's saying.
EAT SANDWICH
You are happy and content
GO NORTH
You have entered a classroom. An exam is about to begin.
TAKE EXAM
Wow! You get an A! The professor gives you a gold_star
Email me your completed Game.java, new rooms java files, and any other new files.