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 command fixed (I think)

By: ace on Jul 28th, 2010  |  syntax: None  |  size: 0.63 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. 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.            if(lastDirection=="north")
  5.            
  6.            {
  7.                reverseLastDirection = "south";
  8.            if(lastDirection == "east")
  9.            {
  10.                reverseLastDirection = "west";
  11.             }
  12.            if(lastDirection == "south")
  13.             {
  14.                reverseLastDirection = "north";
  15.             }
  16.            if (lastDirection == "west")
  17.             {
  18.                reverseLastDirection = "east";
  19.             }
  20.            Command backCommand = new Command("go", reverseLastDirection);
  21.            goRoom(backCommand);
  22.            }