Exemple #1
0
        /// <summary>
        /// Clone the team state.
        /// </summary>
        public TeamState Clone()
        {
            TeamState state = new TeamState()
            {
                TeamId          = this.TeamId,
                TowersDestroyed = this.TowersDestroyed,
                DragonKills     = this.DragonKills,
                BaronKills      = this.BaronKills
            };

            foreach (var towerType in TowerTypesDestroyed)
            {
                state.TowerTypesDestroyed.Add(towerType.Key, towerType.Value);
            }
            foreach (var champion in Champions)
            {
                state.Champions.Add(champion.Key, champion.Value.Clone());
            }

            return(state);
        }
Exemple #2
0
        /// <summary>
        /// Clone the team state.
        /// </summary>
        public TeamState Clone()
        {
            TeamState state = new TeamState()
            {
                TeamId = this.TeamId,
                TowersDestroyed = this.TowersDestroyed,
                DragonKills = this.DragonKills,
                BaronKills = this.BaronKills
            };

            foreach (var towerType in TowerTypesDestroyed)
            {
                state.TowerTypesDestroyed.Add(towerType.Key, towerType.Value);
            }
            foreach (var champion in Champions)
            {
                state.Champions.Add(champion.Key, champion.Value.Clone());
            }

            return state;
        }