示例#1
0
        public PieceCollection getUnpickedPieces()
        {
            PieceCollection unassigned = new PieceCollection();

            foreach (Piece p in pieces)
            {
                if (!p.picked)
                {
                    unassigned.addPiece(p);
                }
            }
            return(unassigned);
        }
示例#2
0
        public DominoSet()
        {
            pieces = new PieceCollection();
            int pieceId = 0;

            //Create the pieces
            for (int upperValue = 0; upperValue < 7; upperValue++)
            {
                for (int lowerValue = upperValue; lowerValue < 7; lowerValue++)
                {
                    pieces.addPiece(new Piece(upperValue, lowerValue, pieceId));
                    pieceId++;
                }
            }
        }
示例#3
0
 public void addPiece(Piece p)
 {
     playerPieces.addPiece(p);
 }