Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions NumberGuessGame/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,14 @@ public static void Main(string[] args)
//Try to parse the int
if (!int.TryParse(sGuess, out iGuess)){
//We couldn't make a number
Console.WriteLine("Look, you have to guess a number. No more funny Business!");
Console.WriteLine("Look, you have to guess a number. No more funny business!");
continue;
}

//Okay, we have a valid int, but we need to make sure it's in range
if (iGuess >= 100 || iGuess < 0){
Console.WriteLine("That's not how this works! That's not how any of this works! Guess again!");
Console.WriteLine("That's not how this works! That's not how any of this works!");
Console.WriteLine("What kind of numbers do you think we're working with? Guess again!");
continue;
}

Expand All @@ -84,7 +85,8 @@ public static void Main(string[] args)
if (iGuess == secret){
Console.WriteLine("Correct! You're a winner!");
Console.WriteLine("...Great, Now I can go home and nap!");
Console.WriteLine("Shoo! Game's over! Go Away!");
System.Threading.Thread.Sleep(4000);
Console.WriteLine("Are you still here? Shoo! Game's over! Go Away!");
Console.ReadKey();
break;
}
Expand Down