In InitialiseField the question to load an existing file only accepts Y and not y
Revision as of 10:20, 13 March 2017 by Sluttyruttybutty (talk | contribs)
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 }
Explanation
Line 6: Added .ToLower() in the if statement which means both 'Y' and 'y' will be treated as a lower case 'y'