Exemplo n.º 1
0
        public List <PokerPile> RemoveXD(List <Poker> pokers)
        {
            List <Poker> xd = new List <Poker>();
            PokerPile    x  = new PokerPile(PokerNumType.PX, 0);
            PokerPile    d  = new PokerPile(PokerNumType.PD, 0);

            for (int i = 0; i < pokers.Count; i++)
            {
                Poker p = pokers[i];
                if (p.NumType == PokerNumType.PX || p.NumType == PokerNumType.PD)
                {
                    xd.Add(p);
                    if (p.NumType == PokerNumType.PX)
                    {
                        x.AddPoker(1);
                    }
                    else
                    {
                        d.AddPoker(1);
                    }
                }
            }

            if (xd.Count > 0)
            {
                foreach (var p in xd)
                {
                    pokers.Remove(p);
                }
            }

            List <PokerPile> xdPile = new List <PokerPile>();

            if (x.Count > 0)
            {
                xdPile.Add(x);
            }
            if (d.Count > 0)
            {
                xdPile.Add(d);
            }

            return(xdPile);
        }
Exemplo n.º 2
0
 public bool IsHeartHost(Poker poker)
 {
     return(poker.NumType == CurrentHost && poker.SuitType == PokerSuitType.HEART);
 }
Exemplo n.º 3
0
 public int Compare(Poker p1, Poker p2)
 {
     return(_value.Compare(p1.NumType, p2.NumType));
 }