Permalink
Browse files

AdventureSample - extract Leave method

  • Loading branch information...
bobbymcr committed May 6, 2018
1 parent c704060 commit c841d2c79be186abfb49c2d79b8cfd4ae0b46ca7
Showing with 23 additions and 17 deletions.
  1. +23 −17 projects/AdventureSample/src/Adventure/adventure.cs
@@ -1358,23 +1358,7 @@ private int Main()
goto L4800;
}
bool ret;
if ((((currentRoom.CompareTo(13)) != (0)) ? (-1) : (0)) != (0))
{
PRINT(("") + ("PLEASE GIVE A DIRECTION!"));
ret = false;
}
else if ((((int)(((noun.CompareTo("BOA")) != (0)) ? (-1) : (0))) & ((int)(((noun.CompareTo("")) != (0)) ? (-1) : (0)))) != (0))
{
PRINT(("") + ("HUH?"));
ret = false;
}
else
{
currentRoom = ((objectRooms[(int)(11)]) - (128));
ret = true;
}
bool ret = Leave();
if (ret)
{
goto L90;
@@ -1409,6 +1393,28 @@ private int Main()
goto L100;
}
private bool Leave()
{
bool ret;
if ((((currentRoom.CompareTo(13)) != (0)) ? (-1) : (0)) != (0))
{
PRINT(("") + ("PLEASE GIVE A DIRECTION!"));
ret = false;
}
else if ((((int)(((noun.CompareTo("BOA")) != (0)) ? (-1) : (0))) & ((int)(((noun.CompareTo("")) != (0)) ? (-1) : (0)))) != (0))
{
PRINT(("") + ("HUH?"));
ret = false;
}
else
{
currentRoom = ((objectRooms[(int)(11)]) - (128));
ret = true;
}
return ret;
}
private void Fight()
{
if ((((noun.CompareTo("")) == (0)) ? (-1) : (0)) != (0))

0 comments on commit c841d2c

Please sign in to comment.