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); }
public bool IsHeartHost(Poker poker) { return(poker.NumType == CurrentHost && poker.SuitType == PokerSuitType.HEART); }
public int Compare(Poker p1, Poker p2) { return(_value.Compare(p1.NumType, p2.NumType)); }