コード例 #1
0
ファイル: PuzzleGrid.cs プロジェクト: presscad/BaseLayer
 /// <summary>Loads a new puzzle and sets it to be the current puzzle in the grid.</summary>
 /// <param name="state">The puzzle to load.</param>
 public void LoadNewPuzzle(PuzzleState state)
 {
     ClearUndoCheckpoints();
     ClearOriginalPuzzleCheckpoint();
     SetOriginalPuzzleCheckpoint(state.Clone());
     State         = state;
     _selectedCell = FirstEmptyCell;
 }
コード例 #2
0
    public PuzzleStateNode CloneAndAddChild(string name, PuzzleNode node)
    {
        PuzzleStateNode n = new PuzzleStateNode(state.Clone());

        n.step = step + 1;
        new PuzzleStateEdge(name, node, this, n);
        return(n);
    }
コード例 #3
0
ファイル: PuzzleGrid.cs プロジェクト: Farouq/semclone
		/// <summary>Loads a new puzzle and sets it to be the current puzzle in the grid.</summary>
		/// <param name="state">The puzzle to load.</param>
		public void LoadNewPuzzle(PuzzleState state)
		{
			ClearUndoCheckpoints();
			ClearOriginalPuzzleCheckpoint();
			SetOriginalPuzzleCheckpoint(state.Clone());
			State = state;
			_selectedCell = FirstEmptyCell;
		}