Exemplo n.º 1
0
        public PlayerSlotCollection(int numSlots)
        {
            SlotList = new ThreadSafeList<PlayerSlot>(numSlots);

            PlayerSlot previous = null;
            PlayerSlot current = null;
            for (int i = 0; i < numSlots; i++)
            {
                current = new PlayerSlot(i, SyncLock);

                if (previous != null)
                    previous.FillNextSlot(current);

                SlotList.Add(current);

                previous = current;
            }

            //-- Link the last slot to the first.
            current.FillNextSlot(SlotList[0]);
        }
Exemplo n.º 2
0
 public void FillNextSlot(PlayerSlot nextSlot)
 {
     NextSlot = nextSlot;
 }
Exemplo n.º 3
0
        public void MoveDealerChipTo(PlayerSlot nextSlot)
        {
            object tempChip = DealerButton;

            DealerButton = null;

            nextSlot.ReceiveDealerChip(tempChip);
        }