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]); }
public void FillNextSlot(PlayerSlot nextSlot) { NextSlot = nextSlot; }
public void MoveDealerChipTo(PlayerSlot nextSlot) { object tempChip = DealerButton; DealerButton = null; nextSlot.ReceiveDealerChip(tempChip); }