private void Initialize() { NumberOfPiles = Variation.NumberOfPiles; Moves = new MoveList(); stockPile = new Pile(); downPiles = new Pile[NumberOfPiles]; upPiles = new Pile[NumberOfPiles]; spaceFlags = new bool[NumberOfPiles]; int numberOfDiscardPiles = Variation.NumberOfCards / 13; discardPileStock = new Pile[numberOfDiscardPiles]; for (int i = 0; i < numberOfDiscardPiles; i++) { discardPileStock[i] = new Pile(); } discardPiles = new FastList <Pile>(NumberOfPiles); spaces = new FastList <int>(NumberOfPiles); for (int row = 0; row < NumberOfPiles; row++) { downPiles[row] = new Pile(); upPiles[row] = new Pile(); } scratchPile = new Pile(); Refresh(); }
public ComplexMove(int index, MoveList moves, MoveList supplementaryList) { Move scoreMove = moves[index]; ScoreMove = scoreMove; SupplementaryMoves = new MoveList(); for (int next = scoreMove.Next; next != -1; next = supplementaryList[next].Next) { SupplementaryMoves.Add(supplementaryList[next]); } HoldingList = new MoveList(); for (int next = scoreMove.HoldingNext; next != -1; next = supplementaryList[next].Next) { HoldingList.Add(supplementaryList[next]); } }
public MoveList(MoveList other) { Copy(other); }