Ejemplo n.º 1
0
 public static bool DealRiver(Table table)
 {
     if (table.Community.Cards.Count == 4)
     {
         table.Community.Cards.Add(DeckServices.DrawCard(table.DeckOfCards));
         return(true);
     }
     return(false);
 }
Ejemplo n.º 2
0
 public static bool RemoveAllHandsFromTable(Table table)
 {
     if (table.Hands != null)
     {
         foreach (Hand h in table.Hands)
         {
             DeckServices.ReturnCards(h, table.DeckOfCards);
         }
         DeckServices.ReturnCards(table.Community, table.DeckOfCards);
         table.Hands.Clear();
         DeckServices.Shuffle(table.DeckOfCards);
         return(true);
     }
     return(false);
 }
Ejemplo n.º 3
0
 public static bool PutHandsOnTable(Table table, int numberOfHands)
 {
     if ((table.Hands.Count + numberOfHands) <= table.MaxHands)
     {
         for (int i = 0; i < numberOfHands; i++)
         {
             Hand h = DeckServices.DrawHoldemHand(table.DeckOfCards);
             h.IndexOnTable = i;
             h.Table        = table;
             table.Hands.Add(h);
         }
         return(true);
     }
     return(false);
 }
Ejemplo n.º 4
0
 public static void ClearCommunityCards(Table table)
 {
     DeckServices.ReturnCards(table.Community, table.DeckOfCards);
     table.Community.Cards.Clear();
 }