/// <summary> /// Records a match for one individual by adding data to that individual. /// </summary> /// <param name="contestant">the combatant's genomes</param> /// <param name="finalScore">Score to add to the combatant</param> /// <param name="survived">True if this individual was alive at the end of the match</param> /// <param name="killedAllDrones">True if all the drones were killed in this match</param> /// <param name="killedDrones">The number of drones killed in this match</param> /// <param name="allCompetitors">All the individuals' genomes in the match</param> /// <param name="lastSurvivor">True if this contestant was the only one left at the end.</param> public void RecordMatch(GenomeWrapper contestant, float finalScore, bool survived, bool killedAllDrones, int killedDrones, List <string> allCompetitors, bool lastSurvivor) { allCompetitors = allCompetitors ?? new List <string>(); var individual = Individuals.First(i => i.Genome == contestant.Genome); individual.Finalise(contestant); individual.RecordMatch(finalScore, survived, killedAllDrones, killedDrones, allCompetitors, lastSurvivor); }