Ejemplo n.º 1
0
 public void Start()
 {
     game = new Game();
     bool running = true;
     string input;
     int choice;
     ShowResult();
     ShowOptions();
     while (running)
     {
         input = Console.ReadLine();
         if (!Int32.TryParse(input, out choice) || (choice != 1 && choice != 2))
         {
             Console.WriteLine("Invalid input, try again.");
             continue;
         }
         if (game.GameOver())
         {
             if (choice == 1)
             {
                 game.Reset();
                 ShowResult();
                 ShowOptions();
             }
             else
             {
                 running = false;
             }
         }
         else
         {
             game.AwardPoint(choice);
             ShowResult();
             ShowOptions();
         }
     }
 }