Beispiel #1
0
        static void Game(Sweeper sweeper)
        {
            bool loop = true;

            while (loop == true)
            {
                sweeper.Print();

                int x = GetCoordinate("y ");
                int y = GetCoordinate("x ");

                if (sweeper.CheckPositionValid(x, y) == true)
                {
                    sweeper.HitCoordinates(x, y);
                    if (sweeper.DoesPositionHaveBomb(x, y) == true)
                    {
                        loop = false;
                        GameOver();
                    }
                }
            }
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            Sweeper sweeper = new Sweeper(FetchGridSize());

            Game(sweeper);
        }