示例#1
0
        public override void AddGame(dsplayer pl, dsplayer opp)
        {
            dsstats_race cmdr = new dsstats_race();

            cmdr = this.objRace(pl.RACE);
            this.GAMES++;
            cmdr.RGAMES++;

            cmdr.DPS += pl.GetDPS();
            this.DPS += pl.GetDPS();

            cmdr.DPM += pl.GetDPM();
            this.DPM += pl.GetDPM();

            cmdr.DPV += pl.GetDPV();
            this.DPV += pl.GetDPV();


            dsstats_vs cmdr_vs = new dsstats_vs();

            cmdr_vs = cmdr.OPP;
            cmdr_vs.GAMES++;
            dsstats_race cmdr_opp = new dsstats_race();

            cmdr_opp = cmdr_vs.objRaceVS(opp.RACE);
            cmdr_opp.RGAMES++;

            cmdr_opp.DPS += pl.GetDPS();
            cmdr_opp.DPM += pl.GetDPM();
            cmdr_opp.DPV += pl.GetDPV();
        }
示例#2
0
        public virtual dsstats_race objRace(string cmdr)
        {
            dsstats_race race = new dsstats_race();

            race = this.LRACE.Find(x => x.RACE == cmdr);
            return(race);
        }
示例#3
0
        public void Init()
        {
            string[] s_races = new string[]
            {
                "Abathur",
                "Alarak",
                "Artanis",
                "Dehaka",
                "Fenix",
                "Horner",
                "Karax",
                "Kerrigan",
                "Nova",
                "Raynor",
                "Stetmann",
                "Stukov",
                "Swann",
                "Tychus",
                "Vorazun",
                "Zagara",
                "Protoss",
                "Terran",
                "Zerg"
            };
            List <dsstats_race> list = new List <dsstats_race>();

            foreach (string r in s_races)
            {
                dsstats_race cmdr = new dsstats_race();
                cmdr.RACE = r;
                list.Add(cmdr);
            }

            this.VS = list;
        }
示例#4
0
        public dsstats_race objRaceVS(string cmdr)
        {
            dsstats_race race = new dsstats_race();

            race = this.VS.Find(x => x.RACE == cmdr);
            return(race);
        }
示例#5
0
        public double GetDURATION(string race)
        {
            double dur = 0;

            dsstats_race cmdr = new dsstats_race();

            cmdr = VS.Find(x => x.RACE == race);
            dur  = cmdr.GetDURATION();
            return(dur);
        }
示例#6
0
        public override void AddWin(dsplayer pl, dsplayer opp)
        {
            dsstats_race cmdr = new dsstats_race();

            cmdr = this.objRace(pl.RACE);
            this.WINS++;
            cmdr.RWINS++;

            dsstats_vs cmdr_vs = new dsstats_vs();

            cmdr_vs = cmdr.OPP;
            cmdr_vs.WINS++;
            dsstats_race cmdr_opp = new dsstats_race();

            cmdr_opp = cmdr_vs.objRaceVS(opp.RACE);
            cmdr_opp.RWINS++;
        }
示例#7
0
        public virtual void AddWin(dsplayer race, dsplayer opp_race)
        {
            dsstats_race cmdr = new dsstats_race();

            cmdr = this.objRace(race.RACE);
            this.WINS++;
            cmdr.RWINS++;

            dsstats_vs cmdr_vs = new dsstats_vs();

            cmdr_vs = cmdr.OPP;
            cmdr_vs.WINS++;
            dsstats_race cmdr_opp = new dsstats_race();

            cmdr_opp = cmdr_vs.objRaceVS(opp_race.RACE);
            cmdr_opp.RWINS++;
        }
示例#8
0
        public virtual void AddGame(dsplayer race, dsplayer opp_race)
        {
            dsstats_race cmdr = new dsstats_race();

            cmdr = this.objRace(race.RACE);
            this.GAMES++;
            cmdr.RGAMES++;
            cmdr.AddGame(race.PDURATION);

            dsstats_vs cmdr_vs = new dsstats_vs();

            cmdr_vs = cmdr.OPP;
            cmdr_vs.GAMES++;
            dsstats_race cmdr_opp = new dsstats_race();

            cmdr_opp = cmdr_vs.objRaceVS(opp_race.RACE);
            cmdr_opp.RGAMES++;
            cmdr_opp.AddGame(race.PDURATION);
        }