public void StartGame(IGridOperations grid) { do { turn++; Console.WriteLine("Turn " + turn); grid.ShowGrid(); finish = grid.CheckCellPosition(turn); if (!finish) { grid.RevealNeighbors(); finish = grid.Win(); } } while (!finish); if (grid.Win()) { Console.WriteLine("You Won the game in " + turn + " turns :)"); grid.RevealMines(); } else { Console.WriteLine("ooh you step over the Mine, :("); grid.RevealMines(); } }
public Play() { _Grid = new Grid(new GridIO()); StartGame(_Grid); }