public void SendBetRequest(Connection c, Common.GameUtils.Bet _bet, List <Common.GameUtils.Card> _cards)
        {
            Common.IO.OutputManager.Debug.Display("CServerSender", "SendBetRequest() : called");
            Packet05Bet pack = new Packet05Bet()
            {
                Descr = Common.IO.Messages.Server.BetRequest,
                Bet   = _bet,
                Cards = _cards
            };

            Console.WriteLine("CardCount2=" + pack.Cards.Count + "");
            try
            {
                c.SendObject <Packet05Bet>("BetRequest", pack);
            }
            catch (InvalidOperationException ex)
            {
                Console.WriteLine("InvalidOperationException : " + ex.ToString());
                throw ex;
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception : " + e.ToString());
            }
        }
Ejemplo n.º 2
0
                public static int LastBet2(Common.GameUtils.Bet bet)
                {
                    Console.Write("Last Bet : ");
                    Console.WriteLine(bet.player.Name + " has bet " + bet.points
                                      + " on " + bet.suit);

                    return(0);
                }
Ejemplo n.º 3
0
 public static int LastBet(Common.GameUtils.Bet bet)
 {
     Console.WriteLine("Last Bet : ");
     Console.WriteLine("Suit = " + bet.suit);
     Console.WriteLine("Points = " + bet.points);
     Console.WriteLine("Player = " + bet.player.Name);
     return(0);
 }
        public void SendBetAccepted(Connection c, Common.GameUtils.Bet bet)
        {
            Packet05Bet pack = new Packet05Bet()
            {
                Descr = Common.IO.Messages.Server.BetRequest,
                Bet   = bet
            };

            c.SendObject <Packet05Bet>("BetAccepted", pack);
        }
Ejemplo n.º 5
0
        public void SendBetAnswer(Common.GameUtils.Bet _bet)
        {
            Packet05Bet pack = new Packet05Bet()
            {
                Descr = clientInfo.name,
                Bet   = _bet
            };

            NetworkComms.SendObject <Packet05Bet>
                ("BetAnswer", serverInfo.Ip, serverInfo.Port, pack);
        }
Ejemplo n.º 6
0
 public static void Bet(Common.GameUtils.Bet bet)
 {
     Console.WriteLine("Bet : ");
     Console.WriteLine("Suit = " + bet.suit);
     Console.WriteLine("Points = " + bet.points);
 }
Ejemplo n.º 7
0
 public void EventBetAdded(Common.GameUtils.Bet bet)
 {
 }
 protected void WhenBetAnswer(PacketHeader packetHeader, Connection connection,
                              Packet05Bet pack)
 {
     Common.GameUtils.Bet bet = pack.Bet;
     server.Room.AddBet(connection, bet);
 }