
rescue1
By:
ace on
Sep 16th, 2010 | syntax:
None | size: 0.93 KB | hits: 24 | expires: Never
private void rescue(Command command)
{
if(!command.hasSecondWord())
{
// if there is no second word, we don't know where to go...
System.out.println("Rescue who?");
return;
}
else
{
String characterID = command.getSecondWord();
if(characters.get(characterID).getCurrentRoom() == null);
{
System.out.println("They are not here!");
}
else
{
if(characters.get(characterID).getCurrentRoom() == player.getCurrentRoom())
{
characters.get(characterID).setCurrentRoom(rooms.get("outside"));
System.out.println (("you have saved ") + characterID + (" !"));
}
else
{
System.out.println("They are not here!");
}
}
}