public bool Fold(string name) { var player = GetPlayer(name); VerifyIsPlayersTurn(player); BetQueue.RemoveFirst(); player.Folded = true; player.Hand[0] = null; player.Hand[1] = null; Pots.ForEach(x => x.RemovePlayer(player)); if (GetPlayersStillInGame().Count() == 1) { BetQueue.Clear(); State = State.DeterminingWinner; NextStage(); return(false); } else { if (BetQueue.Count == 0) { NextStage(); return(false); } else { return(true); } } }
public bool ShowCards(string name) { var player = GetPlayer(name); VerifyIsPlayersTurn(player); BetQueue.RemoveFirst(); Pots.ForEach(x => x.RemovePlayer(player)); ShowPlayerCards.Add(player); if (BetQueue.Count == 0) { NextStage(); return(false); } else { return(true); } }
public bool HideCards(string name) { var player = GetPlayer(name); VerifyIsPlayersTurn(player); BetQueue.RemoveFirst(); player.Hand[0] = null; player.Hand[1] = null; Pots.ForEach(x => x.RemovePlayer(player)); if (BetQueue.Count == 0) { NextStage(); return(false); } else { return(true); } }