Пример #1
0
 public void UpdatePlayerPreFlopStatus(OpponentControl opponent, int OpponentId, StartGameStatus GameStatus)
 {
     if (OpponentId == GameStatus.DealerId)
     {
         opponent.Dealer_Button.Visibility = Visibility.Visible;
     }
     if (OpponentId == GameStatus.SmallBlind.PlayerId)
     {
         opponent.SmallBlind_Button.Visibility = Visibility.Visible;
         opponent.BetAmount        = GameStatus.SmallBlind.BidAmount;
         opponent.BetLabel.Content = opponent.BetAmountStr;
     }
     if (OpponentId == GameStatus.BigBlind.PlayerId)
     {
         opponent.BigBlind_Button.Visibility = Visibility.Visible;
         opponent.BetAmount        = GameStatus.BigBlind.BidAmount;
         opponent.BetLabel.Content = opponent.BetAmountStr;
     }
 }
Пример #2
0
 public void UpdateLastMove(Move lastMove)
 {
     //Checking if the user is the opponent or the curr client:
     if (lastMove.PlayerId == myId)
     {
         FirstPlayer.BetAmount        = lastMove.BidAmount;
         FirstPlayer.BetLabel.Content = FirstPlayer.BetAmountStr;
         if (lastMove.Operation == Operation.Fold)
         {
             FirstPlayer.IsEnabled = false;
         }
     }
     else
     {
         OpponentControl opponent = PlayerControls[lastMove.PlayerId];
         opponent.BetAmount        = lastMove.BidAmount;
         opponent.BetLabel.Content = opponent.BetAmountStr;
         if (lastMove.Operation == Operation.Fold)
         {
             opponent.IsEnabled = false;
         }
     }
 }
Пример #3
0
 public void UpdatePlayerName(OpponentControl opponent, string PlayerName)
 {
     opponent.PlayerNameLabel.Content = PlayerName;
 }