Exemple #1
0
        //send a game update => only the dices who has been rolled
        public List <int> GetGameUpdate(DTO.Player host)
        {
            List <int> Dice = new List <int>();

            //let the client dice
            NewGame.Dice();
            var dice = from p in NewGame.publicState.lastDieRoll select p;

            foreach (var item in dice)
            {
                //get the dices
                Dice.Add(Convert.ToInt32(item));
            }
            return(Dice);
        }
        public List <int> GetGameUpdate(DTO.Player host)
        {
            // var lst = (from l in gamelobbies where l.HostPlayer.PlayerId == host.PlayerId select l).First();

            List <int> Dice = new List <int>();

            NewGame.Dice();
            var dice = from p in NewGame.publicState.lastDieRoll select p;

            foreach (var item in dice)
            {
                Dice.Add(Convert.ToInt32(item));
            }


            return(Dice);
        }