public void Play() { PrintMenu(); PrintBoard(); while (!game.IsCompleted()) { try { bool tempFlag = true; string s = Console.ReadLine(); switch (s) { case "q": tempFlag = false; break; case "r": game.Randomize(); RefreshScreen(); break; default: game.Shift(int.Parse(s)); RefreshScreen(); break; } if (tempFlag == false) { break; } } catch (Exception e) { Console.WriteLine(e.Message); } } }