Ejemplo n.º 1
0
        /// <summary>
        /// Method that Loops through all the game actions.
        /// </summary>
        public void GameLoop()
        {
            // Variable to keep the game loop going
            bool endGame = false;

            // GameLoop
            while (!endGame)
            {
                // Render the game grid
                render.RenderBoard(grid, player);
                // Ask for player input
                player.PlayerController(grid);
                // Update the game
                grid.Update(player);

                //Call method to make sure player is not dead
                player.Die(grid);
            }
        }