Esempio n. 1
0
        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();
        }
Esempio n. 2
0
 public void SetResult(TaquinGame game)
 {
     this.UpdateResultDisplay(game.Grid);
 }
Esempio n. 3
0
 public void SetGame(TaquinGame game)
 {
     this.game = game;
     this.UpdateGridDisplay(game.Grid);
 }