private void CleverBruteForceButton_Click(object sender, EventArgs e) { var numberOfWrongMoves = _game.CleverBruteForce(); using var g = this.CreateGraphics(); g.Clear(this.BackColor); _gameDrawer.Draw(g); MessageBox.Show($"Number of wrong moves was {numberOfWrongMoves}."); }
private void SolveButton_Click(object sender, EventArgs e) { using var g = this.CreateGraphics(); g.Clear(this.BackColor); _gameDrawer.Draw(g); var result = _game.Solve(); if (result is null) { MessageBox.Show("No more solutions found"); } else { _gameDrawer.DrawMove(g, result); } }