GetChoice
Revision as of 11:22, 14 November 2017 by MoistPotato (talk | contribs) (Created page with "private static string GetChoice() { string Choice; Console.WriteLine(); Console.WriteLine("Either:"); Console.WriteLine...")
private static string GetChoice()
{ string Choice; Console.WriteLine(); Console.WriteLine("Either:"); Console.WriteLine(" enter the word you would like to play OR"); Console.WriteLine(" press 1 to display the letter values OR"); Console.WriteLine(" press 4 to view the tile queue OR"); Console.WriteLine(" press 7 to view your tiles again OR"); Console.WriteLine(" press 0 to fill hand and stop the game."); Console.Write("> "); Choice = Console.ReadLine(); Console.WriteLine(); Choice = Choice.ToUpper(); return Choice; }
This block of code is giving the user a choice of what they want to do, it displays the 4 options the user has in a neat way and then waits for the user to choose one of the options. It also makes sure the number is uppercase for a reason.