private void SizeButton_Click(object sender, EventArgs e) { this.SolverTracker.DataSource = null; int newSize = (int)nUDSize.Value; int newBlanks = (int)nUDBlanks.Value; this.size = newSize; this.nbBlanks = newBlanks; this.TaquinTable.Controls.Clear(); this.ResultTable.Controls.Clear(); this.buttons = new Button[size, size]; this.buttonsResult = new Button[size, size]; this.game = new TaquinGame(newSize, newBlanks); this.result = new TaquinGame(newSize, newBlanks); this.initialGame = CopyGrid(game.Grid); InitializeGrid(size); InitializeResult(size); this.SetGame(game); this.SetResult(game); PrecedingMoves.Clear(); ForwardMoves.Clear(); }
public void SetResult(TaquinGame game) { this.UpdateResultDisplay(game.Grid); }
public void SetGame(TaquinGame game) { this.game = game; this.UpdateGridDisplay(game.Grid); }