Beispiel #1
0
        IEnumerator GetRollData()
        {
            yield return(Server.Instance.GetRollData());

//            currentSequence_ = (List<Roll>)Server.Instance.LastResult;
            object o = Server.Instance.LastResult;
            // TODO: Until the server implements a roll cloudscript we fake it here

            List <Roll> rolls = new List <Roll>();

            for (int i = 0; i < 5; ++i)
            {
                Roll roll = new Roll();
                PotentialWins.Build9(roll.Icons, distribution_);
                rolls.Add(roll);
            }

            currentSequence_    = rolls;
            idxNextSequenceIdx_ = 0;
        }
Beispiel #2
0
        public void GetRollSequence(Credentials client, Action <GameServerResult, List <Roll> > callback)
        {
            List <Roll> result = new List <Roll>();

            for (int i = 0; i < 4; ++i)
            {
                List <int> final9 = new List <int>();
                PotentialWins.Build9(final9, probabilitiesStatic_);

                //PotentialWins.Build9WithGuarenteedMatch(
                //    PotentialWins.Difficulty.Level2_Diagonal_Nudge,
                //    final9,
                //    probabilitiesStatic_);

                Roll roll = new Roll()
                {
                    BatchId   = rnd_.Next() << 32 + rnd_.Next(),
                        Icons = final9
                };
                result.Add(roll);
            }

            callback(GameServerResult.Success, result);
        }