private void PlayerLose(HoldemPlayer player, bool byTimeout = false) { Bot.Say(player.PlayerName, "Hävisit: " + player.Bet); Pot += player.Bet; Players.Remove(player); var PlayerScore = new Score(player.PlayerUserId, Score.Holdem); PlayerScore.TotalGains -= player.Bet; if (byTimeout) { PlayerScore.GamesForfeitted = 1; } Users.Get(player.PlayerName).UpdateScore(PlayerScore); }
private void SetNewBet(int newBet, HoldemPlayer player) { ResetPlayerChecks(); SetBasicTimer(); // Increase bet CurrentBet = newBet; if (CurrentBet > MaximumBet) { CurrentBet = MaximumBet; } if (CurrentBet > player.Funds) { CurrentBet = player.Funds; } Bot.Say("Veto nostettu => " + CurrentBet); }
public bool Join(User user) { if (CurrentPhase == Phase.Join) { if (!Players.Any(x => x.UserId == user.UserId)) { var player = new HoldemPlayer(user); player.Cards[0] = Deck.Draw(); player.Cards[1] = Deck.Draw(); Players.Add(player); if (Players.Count == 2) { Timer.Set(RoundTimeLimit, TimeLimit); } return(true); } } return(false); }