Ejemplo n.º 1
0
        private static void Main(string[] args)
        {
            Console.WriteLine("Starting the game");
            Console.WriteLine(); 
            
            var board = new Board();
            Draw(board);

            while (!board.GameOver) //todo check number of cells left to reveal
            {
                var row = ReadRow();
                var col = ReadColumn();
                
                Console.WriteLine();
                
                if (!board.TreatUserInput(row, col))
                    Console.WriteLine("This cell has already been cleared");
                
                Console.WriteLine();

                Draw(board);
            }

            Console.WriteLine(board.GameOver ? "GameOver" : "You won !");
            Console.WriteLine("Press any key to exit");
            Console.ReadKey();

        }