コード例 #1
0
ファイル: Tableau.cs プロジェクト: cococo111111/Spider
        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();
        }
コード例 #2
0
ファイル: ComplexMove.cs プロジェクト: cococo111111/Spider
        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]);
            }
        }
コード例 #3
0
ファイル: MoveList.cs プロジェクト: cococo111111/Spider
 public MoveList(MoveList other)
 {
     Copy(other);
 }