// Игрок делает заказ
 public void PlayerMakeOrder(Order order)
 {
     if (order == null)
         return;
     ServerConnection.ExecuteMessageWithoutResult(new Message(Messages.MESSAGE_GAME_BAZAR_BET,
         String.Format("Size={0},Type={1},Trump={2}", order.Size, (int)order.Type, Helpers.SuitToString(order.Trump))));
 }
 private void BetButton_Click(object sender, EventArgs e)
 {
     OrderType oType = OrderType.ORDER_BET;
     CardSuit oSuit = GetOrderSuit();
     int oSize = (int)OrderSizeUpDown.Value;
     if (CapotCheck.Checked)
     {
         oType = OrderType.ORDER_CAPOT;
     }
     Order order = new Order(oType, oSize, oSuit);
     game.MakeOrder(order);
     Close();
 }
Exemple #3
0
 // Сделать заказ
 public void MakeOrder(Order order)
 {
     serverActions.PlayerMakeOrder(order);
     IsMakingMove = false;
 }
Exemple #4
0
 // Произношение заявки сделанной одним из игроков
 public void BazarPlayerSayHandler(Message Msg)
 {
     Dictionary<string, string> bParams = Helpers.SplitCommandString(Msg.Msg);
     int playerNum = Int32.Parse(bParams["Player"]);
     OrderType orderType = (OrderType)Int32.Parse(bParams["Type"]);
     int orderSize = Int32.Parse(bParams["Size"]);
     CardSuit orderSuit = Helpers.StringToSuit(bParams["Trump"]);
     switch (playerNum)
     {
         case 1:
             {
                 Player1Order = new Order(orderType, orderSize, orderSuit);
                 break;
             }
         case 2:
             {
                 Player2Order = new Order(orderType, orderSize, orderSuit);
                 break;
             }
         case 3:
             {
                 Player3Order = new Order(orderType, orderSize, orderSuit);
                 break;
             }
         case 4:
             {
                 Player4Order = new Order(orderType, orderSize, orderSuit);
                 break;
             }
         default:
             {
                 break;
             }
     }
     gameForm.UpdateGraphics();
 }
Exemple #5
0
 // Завершение процесса торговли
 public void BazarEndHandler(Message Msg)
 {
     Player1Order = null;
     Player2Order = null;
     Player3Order = null;
     Player4Order = null;
     Dictionary<string, string> bParams = Helpers.SplitCommandString(Msg.Msg);
     BeloteTeam oTeam = (BeloteTeam)Int32.Parse(bParams["Team"]);
     OrderType oType = (OrderType)Int32.Parse(bParams["Type"]);
     CardSuit oSuit = (CardSuit)Int32.Parse(bParams["Trump"]);
     int oSize = Int32.Parse(bParams["Size"]);
     EndOrder = new Order(oType, oSize, oSuit);
     EndOrder.ChangeTeam(oTeam);
     Status = TableStatus.BONUSES;
     gameForm.UpdateGraphics();
 }
Exemple #6
0
 public void SetEndOrder(Order endOrder)
 {
     for (var i = 0; i < 4; i++)
         orders[i] = null;
     EndOrder = endOrder;
 }
Exemple #7
0
 // Отрисовывает информацию о сделанной игроком ставке
 private void UpdatePlayerAddInfoBazar(int serverNumber, Order order)
 {
     int graphicNumber = CoordinatesTransmitor.ServerPlaceToGraphicPlace(serverNumber, game.Information.Place);
     switch (graphicNumber)
     {
         case 1:
             {
                 Player1AddLabel.Text = (order != null) ? OrderTypeToString(order.Type) : "";
                 if (order != null)
                 {
                     Player1BetLabel.Text = (order.Size != 0) ? order.Size.ToString() : "";
                 }
                 else
                     Player1BetLabel.Text = "";
                 if ((order != null) && ((order.Type == OrderType.ORDER_BET) || (order.Type == OrderType.ORDER_CAPOT)))
                     Player1BetSuit.Image = suitesImageList.Images[((int)order.Trump)];
                 else
                     Player1BetSuit.Image = null;
                 break;
             }
         case 2:
             {
                 Player2AddLabel.Text = (order != null) ? OrderTypeToString(order.Type) : "";
                 if (order != null)
                 {
                     Player2BetLabel.Text = (order.Size != 0) ? order.Size.ToString() : "";
                 }
                 else
                     Player2BetLabel.Text = "";
                 if ((order != null) && ((order.Type == OrderType.ORDER_BET) || (order.Type == OrderType.ORDER_CAPOT)))
                     Player2BetSuit.Image = suitesImageList.Images[((int)order.Trump)];
                 else
                     Player2BetSuit.Image = null;
                 break;
             }
         case 3:
             {
                 Player3AddLabel.Text = (order != null) ? OrderTypeToString(order.Type) : "";
                 if (order != null)
                 {
                     Player3BetLabel.Text = (order.Size != 0) ? order.Size.ToString() : "";
                 }
                 else
                     Player3BetLabel.Text = "";
                 if ((order != null) && ((order.Type == OrderType.ORDER_BET) || (order.Type == OrderType.ORDER_CAPOT)))
                     Player3BetSuit.Image = suitesImageList.Images[((int)order.Trump)];
                 else
                     Player3BetSuit.Image = null;
                 break;
             }
         case 4:
             {
                 Player4AddLabel.Text = (order != null) ? OrderTypeToString(order.Type) : "";
                 if (order != null)
                 {
                     Player4BetLabel.Text = (order.Size != 0) ? order.Size.ToString() : "";
                 }
                 else
                     Player4BetLabel.Text = "";
                 if ((order != null) && ((order.Type == OrderType.ORDER_BET) || (order.Type == OrderType.ORDER_CAPOT)))
                     Player4BetSuit.Image = suitesImageList.Images[((int)order.Trump)];
                 else
                     Player4BetSuit.Image = null;
                 break;
             }
     }
 }
 // Сделать заказ
 public void MakeOrder(Order order)
 {
     try
     {
         serverActions.Game.PlayerMakeOrder(order);
         gameData.IsMakingMove = false;
     }
     catch (Exception Ex)
     {
         throw new BeloteClientException("Произошла ошибка во время совершения заказа", Ex);
     }
 }
Exemple #9
0
 // Сделать заказ
 public void MakeOrder(Order order)
 {
     clientInformation.MakeOrder(order);
 }