Permalink
Browse files

AdventureSample - use multiple returns in Leave

  • Loading branch information...
bobbymcr committed May 6, 2018
1 parent c841d2c commit f524b8b026c8b6706f219f27f26ce965de82c89a
Showing with 3 additions and 6 deletions.
  1. +3 −6 projects/AdventureSample/src/Adventure/adventure.cs
@@ -1395,24 +1395,21 @@ private int Main()
private bool Leave()
{
bool ret;
if ((((currentRoom.CompareTo(13)) != (0)) ? (-1) : (0)) != (0))
{
PRINT(("") + ("PLEASE GIVE A DIRECTION!"));
ret = false;
return false;
}
else if ((((int)(((noun.CompareTo("BOA")) != (0)) ? (-1) : (0))) & ((int)(((noun.CompareTo("")) != (0)) ? (-1) : (0)))) != (0))
{
PRINT(("") + ("HUH?"));
ret = false;
return false;
}
else
{
currentRoom = ((objectRooms[(int)(11)]) - (128));
ret = true;
return true;
}
return ret;
}
private void Fight()

0 comments on commit f524b8b

Please sign in to comment.