private void LoadFile() { var gameLoader = new LoadGameFromFile(); _game = gameLoader.Load("ComplexGame.txt").GetAwaiter().GetResult(); _gameDrawer = new GameDrawer(_game); }
public Form1() { InitializeComponent(); this.Text = "Minesweeper"; this.Size = new Size(1000, 1000); this.BackColor = Color.White; var solveButton = new Button { Text = "Solve", }; solveButton.Click += SolveButton_Click; this.Controls.Add(solveButton); var gameLoader = new LoadGameFromFile(); _game = gameLoader.Load("InitialGame.txt").GetAwaiter().GetResult(); _gameDrawer = new GameDrawer(_game); this.Paint += Form1_Paint; }