/**
 * Command class.
 * 
 * @author  Ryan Seys
 */

public class Command
{
    private String firstWord;
    private String secondWord;

    /**
     * Create a command object. First and second word must be supplied, but
     * either one (or both) can be null.
     * @param firstWord The first word of the command. Null if the command
     *                  was not recognised.
     * @param secondWord The second word of the command.
     */
    public Command(String firstWord, String secondWord)
    {
        this.firstWord = firstWord;
        this.secondWord = secondWord;
    }

    /**
     * Return the command word (the first word) of this command. If the
     * command was not understood, the result is null.
     * @return The command word.
     */
    public String getFirstWord()
    {
        return firstWord;
    }
    
    /**
     * Return the command word (the first word) of this command. If the
     * command was not understood, the result is null.
     * @return The command word.
     */
    public String getCommandWord()
    {
        return firstWord; //basically the same as getFirstWord
    }

    /**
     * @return The second word of this command. Returns null if there was no
     * second word.
     */
    public Object getSecondWord()
    {
        return secondWord;
    }

    /**
     * @return true if this command was not understood.
     */
    public boolean isUnknown()
    {
        return (firstWord == null);
    }
    
    /**
     * @return whether the command is undoable
     */
    public boolean isUndoable() {
    	return true; // TODO: implement this
    }
    
    /**
     * @return true if the command has a second word.
     */
    public boolean hasSecondWord()
    {
        return (secondWord != null);
    }
    
    public Command getOpposite() {
    	return new Command("help", null); // TODO: implement this
    }
}


@@ -81,22 +81,28 @@
 private 
-String
+CommandWords
  firstWo
@@ -117,22 +117,22 @@
 private 
-String
+Object
  secondW
@@ -465,22 +465,28 @@
 Command(
-String
+CommandWords
  firstWo
@@ -489,22 +489,22 @@
 stWord, 
-String
+Object
  secondW
@@ -778,30 +778,36 @@
 %0A    public 
-String
+CommandWords
  getFirstWor
@@ -1044,14 +1044,20 @@
 lic 
-String
+CommandWords
  get
@@ -1842,65 +1842,553 @@
    %09
-return new Command(%22help%22, null); // TODO: implement this
+if(firstWord == CommandWords.FIGHT %7C%7C%0A    %09%09firstWord == CommandWords.HELP %7C%7C%0A    %09%09firstWord == CommandWords.QUIT) %7B%0A    %09%09return null;%0A    %09%7D%0A    %09else %7B%0A    %09%09if(firstWord == CommandWords.GO) %7B%0A    %09%09%09return new Command(CommandWords.GO, ((Direction) secondWord).getOpposite());%0A    %09%09%7D%0A    %09%09else if(firstWord == CommandWords.PICKUP) %7B%0A    %09%09%09return new Command(CommandWords.DROP, secondWord);%0A    %09%09%7D%0A    %09%09else if(firstWord == CommandWords.DROP) %7B%0A    %09%09%09return new Command(CommandWords.PICKUP, secondWord);%0A    %09%09%7D%0A    %09return null;%0A    %09%7D
 %0A   

Change getOpposite for Command.java