Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

pour method in game class

By: ace on Aug 25th, 2010  |  syntax: None  |  size: 0.53 KB  |  hits: 20  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.  private void pour(Command command)
  2.         {
  3.             if(!command.hasSecondWord())
  4.                 {
  5.                     System.out.println ("Pour what?");
  6.                    
  7.                 }
  8.                 if (command.getSecondWord().equals ("beer") &&
  9.                 player.getCurrentRoom().itemTest("beerTap") == true)
  10.                 {
  11.                 currentRoom.setItems(beer);
  12.                 }
  13.             else
  14.             {
  15.                 System.out.println("You cannot pour that.");
  16.             }
  17.         }