In InitialiseField the question to load an existing file only accepts Y and not y

From TRCCompSci - AQA Computer Science
Revision as of 10:19, 13 March 2017 by Sluttyruttybutty (talk | contribs) (Created page with "<syntaxhighlight lang=csharp line> static void InitialiseField(char[,] Field) { string Response = ""; Console.Write("Do you want to load a file with seed posit...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
 1 static void InitialiseField(char[,] Field)
 2     {
 3       string Response = "";
 4       Console.Write("Do you want to load a file with seed positions? (Y/N): ");
 5       Response = Console.ReadLine();
 6       if (Response.ToLower() == "y")
 7       {
 8         ReadFile(Field);
 9       }
10       else
11       {
12         CreateNewField(Field);
13       }
14     }