Permalink
Browse files

AdventureSample - reduce gotos in Leave routine

  • Loading branch information...
bobbymcr committed May 6, 2018
1 parent ee9d1cc commit c7040607f93953c9ea562b4307f040528e02f26c
Showing with 16 additions and 6 deletions.
  1. +16 −6 projects/AdventureSample/src/Adventure/adventure.cs
@@ -1358,20 +1358,30 @@ private int Main()
goto L4800;
}
bool ret;
if ((((currentRoom.CompareTo(13)) != (0)) ? (-1) : (0)) != (0))
{
PRINT(("") + ("PLEASE GIVE A DIRECTION!"));
goto L100;
ret = false;
}
if ((((int)(((noun.CompareTo("BOA")) != (0)) ? (-1) : (0))) & ((int)(((noun.CompareTo("")) != (0)) ? (-1) : (0)))) != (0))
else if ((((int)(((noun.CompareTo("BOA")) != (0)) ? (-1) : (0))) & ((int)(((noun.CompareTo("")) != (0)) ? (-1) : (0)))) != (0))
{
PRINT(("") + ("HUH?"));
goto L100;
ret = false;
}
else
{
currentRoom = ((objectRooms[(int)(11)]) - (128));
ret = true;
}
currentRoom = ((objectRooms[(int)(11)]) - (128));
goto L90;
if (ret)
{
goto L90;
}
goto L100;
L4800:
;
if ((((verb.CompareTo("FIG")) != (0)) ? (-1) : (0)) != (0))

0 comments on commit c704060

Please sign in to comment.