World Of Zuul

I am really struggling with the World of Zuul game. The take command simply will not work! The drop one is fine though. Any help would be appreciated?

public void doDrop(Command c) {

if (! c.hasSecondWord()) { // "DROP",but no object named

System.out.println("Drop what?");

return;

}

String s = c.getSecondWord();

Item i = findByName(s, inventory);

if (i == null) {

System.out.println("You don't have a " + s);

return;

}

inventory.remove(i);

currentRoom.addItem(i);

System.out.println("You have dropped the " + s);

}

/**

* doTake: doesn't do anything yet

*/

public void doTake(Command c)

{

if(! c.hasSecondWord()) {

// if there is no second word, we don't know what to take

System.out.println("Take what?");

return;

}

String s = c.getSecondWord();

Item i = inventory.currentRoom().addItem(i);

if (i == null) {

System.out.println("There is no " + s + " here.");

return;

}

player.addItem(i);

player.currentRoom().remove(i);

}

[1137 byte] By [IndianaxJonesa] at [2007-11-27 3:50:25]
# 1

> I am really struggling with the World of Zuul game. The take command simply will not work! The drop one is fine though. Any help would be appreciated?

[url=http://homepages.tesco.net/~J.deBoynePollard/FGA/problem-report-standard-litany.html]Problem Report Standard Litany[/url]

~

yawmarka at 2007-7-12 8:54:20 > top of Java-index,Java Essentials,Java Programming...