public void PlayerHandUpdate(VMEODClient client, VMEODPizzaPlayer player)
        {
            string msg = "";

            foreach (var item in player.Hand)
            {
                msg += ((item == null) ? "--" : item.ToString()) + "\n";
            }
            client.Send("pizza_hand", msg);
        }
        public override void OnConnection(VMEODClient client)
        {
            var param = client.Invoker.Thread.TempRegisters;

            if (client.Avatar != null)
            {
                //take tuning settings from object
                PhoneWaitSeconds               = param[1];
                ContributionTimeoutSeconds     = param[2];
                RestartDelaySeconds            = param[3];
                CardsPerSmallIngredient        = param[4];
                CardsPerMediumIngredient       = param[5];
                CardsPerLargeIngredient        = param[6];
                CardsPerBonusIngredientPerSize = param[7];

                //what part are we trying to join?
                var station = param[0];
                if (Players[station] != null)
                {
                    //what? someone's already here...
                    Server.Disconnect(client);
                }
                else
                {
                    client.Send("pizza_show", "");
                    Players[station] = client;
                    //if not initialized, set up this player with an empty hand
                    //otherwise inherit the last hand.
                    if (PizzaPlayers[station] == null)
                    {
                        PizzaPlayers[station] = new VMEODPizzaPlayer();
                    }
                    PlayerRosterUpdate();
                }
            }
            else
            {
                //we're the pizza controller!
                ControllerClient = client;
            }
        }
 public void PlayerHandUpdate(VMEODClient client, VMEODPizzaPlayer player)
 {
     string msg = "";
     foreach (var item in player.Hand)
     {
         msg += ((item == null) ? "--" : item.ToString()) + "\n";
     }
     client.Send("pizza_hand", msg);
 }
        public override void OnConnection(VMEODClient client)
        {
            var param = client.Invoker.Thread.TempRegisters;
            if (client.Avatar != null)
            {
                //take tuning settings from object
                PhoneWaitSeconds = param[1];
                ContributionTimeoutSeconds = param[2];
                RestartDelaySeconds = param[3];
                CardsPerSmallIngredient = param[4];
                CardsPerMediumIngredient = param[5];
                CardsPerLargeIngredient = param[6];
                CardsPerBonusIngredientPerSize = param[7];

                //what part are we trying to join?
                var station = param[0];
                if (Players[station] != null)
                {
                    //what? someone's already here...
                    Server.Disconnect(client);
                }
                else
                {
                    client.Send("pizza_show", "");
                    Players[station] = client;
                    PizzaPlayers[station] = new VMEODPizzaPlayer();
                    PlayerRosterUpdate();
                }
            }
            else
            {
                //we're the pizza controller!
                ControllerClient = client;
            }
        }