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

back 2

By: ace on Jul 28th, 2010  |  syntax: None  |  size: 0.81 KB  |  hits: 15  |  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 back()
  2.        {
  3.            String reverseLastDirection = "";
  4.            Command backCommand = new Command("go", reverseLastDirection);
  5.            if(lastDirection=="north")
  6.            
  7.            {
  8.            reverseLastDirection = "south";
  9.            backCommand = ("go", reverseLastDirection);
  10.            goRoom(backCommand);
  11.            if(lastDirection == "east")
  12.            {
  13.                reverseLastDirection = "west";
  14.                goRoom(backCommand);
  15.             }
  16.             if(lastDirection == "south")
  17.             {
  18.                 reverseLastDirection = "north";
  19.                 goRoom(backCommand);
  20.             }
  21.             if (lastDirection == "west")
  22.             {
  23.                 reverseLastDirection = "east";
  24.                 goRoom(backCommand);
  25.             }
  26.            }