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(); } } } }
static void Main(string[] args) { Sweeper sweeper = new Sweeper(FetchGridSize()); Game(sweeper); }