JAVA
CommandEnum Class Is Wrong
You have this:
public class CommandEnum{ /** A constant array that holds all valid command words. */
public enum validCommands{look, go, quit, help, status, back};
...
That means that CommandEnum is a normal class, and inside it there is an enumeration named validCommands. Instead, CommandEnum is itself supposed to be the enumeration, like this:
public enum CommandEnum { LOOK("look"), GO("go"),
CommandWords.isCommand() Method Too Complicated
Command.CommandWord Field is Wrong Typ
After you fix the CommandEnum class, you need to change this field to be a CommandEnum, as explained in point 4 of section 3.3 in the instructions.
Previous Room Mutator Should Not Exist
Whenever possible, we want to hide the details of a class inside it and not let anyone else change them. Making a mutator for the Player's previousRoom field allows any code anywhere to change it -- and requires that you always remember to change both the current and previous rooms at the same time. A better solution is to have the previous room automatically change whenever the current room does.
__
Fields Should Be Initialized In Constructors
That includes the previousRoom field in the Player class. |
Top of Form
Bottom of Form
Location Information Confusing
Look at what gets printed when you enter a room. The names of all of the exits are pushed together with the word exit inserted multiple times: The name and description get printed twice:
Kitchen there are two doors, one the way to go out of the house. The second door the way to the living room..ExitsouthExitwest : You are in Kitchen there are two doors, one the way to go out of the house. The second door the way to the living room..ExitsouthExitwest Exits:
Instead, we want it to look something like this:
You are in Kitchen. There are two doors, one the way to go out of the house. The second door the way to the living room. Exits: south west