Esempio n. 1
0
        public virtual void MatchCards(List <UserMatchInfo> usersHandCardList)
        {
            var gdata = App.GetGameData <SssGameData>();

            foreach (UserMatchInfo user in usersHandCardList)
            {
                if (user.Special > (int)CardType.none)
                {
                    SpecialList.Add(user);
                    if (gdata.SelfSeat != user.Seat)
                    {
                        continue;
                    }
                    DunScore dunScore = new DunScore
                    {
                        NormalScore = new List <int>(),
                        AddScore    = new List <int>()
                    };

                    ShootScoreArray = user.ShootScore;
                    for (int i = 0; i < user.AddScore.Count; i++)
                    {
                        dunScore.NormalScore.Add(user.NormalScores[i]);
                        dunScore.AddScore.Add(user.AddScore[i]);
                    }
                    continue;
                }

                MatchInfoList.Add(user);
                if (user.Shoot != null && user.Shoot.ShootCount > 0)
                {
                    ShootList.Add(user.Shoot);
                }

                if (gdata.GetLocalSeat(user.Seat) != 0)
                {
                    continue;
                }


                ShootScoreArray = user.ShootScore;
                for (int i = 0; i < user.AddScore.Count; i++)
                {
                    DunScoreList.Add(new DunScore()
                    {
                        Seat        = user.Seat,
                        NormalScore = user.NormalScores,
                        AddScore    = user.AddScore
                    });
                }
            }

            MatchBegin();   //开始比牌
        }
Esempio n. 2
0
        public void InitTurnResultInfo(ISFSObject data)
        {
            ISFSArray scroeArray = data.GetSFSArray("dunscore");

            DunScore dunScore = new DunScore
            {
                NormalScore = new List <int>(),
                AddScore    = new List <int>()
            };

            foreach (ISFSObject score in scroeArray)
            {
                dunScore.NormalScore.Add(score.GetInt("normal"));
                dunScore.AddScore.Add(score.GetInt("add"));
                _scoreList.Add(dunScore);
            }
        }