Skip to content

Commit

Permalink
AdventureSample - reduce gotos in Leave routine
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbymcr committed May 6, 2018
1 parent ee9d1cc commit c704060
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions projects/AdventureSample/src/Adventure/adventure.cs
Expand Up @@ -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))
Expand Down

0 comments on commit c704060

Please sign in to comment.