View Single Post
Old Sep 25, 2011, 03:13 PM   #12
Kreij
Hardcore Monkey Moderator
 
Kreij's Avatar
 
Join Date: Feb 2007
Location: Cheeseland (Wisconsin, USA)
Posts: 12,117 (5.27/day)
Thanks: 591
Thanked 5,493 Times in 2,937 Posts

System Specs

Are you calling the game() method on a bad input?
That's what restarting the game, no?

If not, I'm confused.

Are you trying to do something like this?

Code:
While input does not equal the exit command
{
  Get input
  if (input is valid)
  {
      Do something with valid input and ask for next input
  }
  else
  {
      If (input does not equal the exit command)
      {
          Throw an error an error and ask for a valid input
      }
   }
}
__________________

Cloud (noun, singular): A dynamic arrangement of multiple potential single points of failure, with a user at one end and their data at the other.


Get more tech news on a wide variety of topics at NextPowerUp
Kreij is offline  
Reply With Quote