Ejemplo n.º 1
0
        // Calculate how many times each dice occur, to calculate more complex scores in the lower section.
        internal void OccurrencesOfDice()
        {
            List <int> diceList = DiceList.Select(dice => dice.DiceValue).ToList();

            for (int i = 1; i < 7; i++)
            {
                int occurence = diceList.FindAll(dice => dice == i).Count();
                OccurenceOfEachDice[i] = occurence;
            }
        }
        public async Task <string> SaveGameAsync()
        {
            CustomBasicList <bool> thisList = DiceList.Select(Items => Items.DidHit).ToCustomBasicList();

            return(await js.SerializeObjectAsync(thisList));
        }