Ejemplo n.º 1
0
 public void UpdateCombo()
 {
     combo = new Combo(Combos.High, 0);
     foreach (var e in AvailableCards.Values)
     {
         if (combo.ComboName < Combos.Quad)
         {
             if (e.Count == 2)
             {
                 combo = combo.TwoItemCombo(e[0].Rank);
             }
             else if (e.Count == 3)
             {
                 combo = combo.ThreeItemCombo(e[0].Rank);
             }
         }
         if (e.Count == 4)
         {
             combo = new Combo(Combos.Quad, e[0].Rank);
         }
     }
     if (combo.ComboName < Combos.Straight)
         combo = combo.CheckStraight(AvailableCards);
     if (combo.Strength == 0)
         combo = new Combo(Combos.High, GetHighestRank());
     if (FlushCheck.Amount >= 5 && combo.ComboName <= Combos.Straight)
     {
         combo = combo.CheckStraightFlush(AvailableCards, FlushCheck);
     }
 }