/// <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); }
/// <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; }