/// <summary> /// Remove an AI car from the alive list /// </summary> /// <param name="car">Car to Remove</param> private void RemoveAICarFromList(AICarData car) { //Check that the car is in the list, remove it if //it is if (aliveAIList.Contains(car)) { aliveAIList.Remove(car); } }
/// <summary> /// Add an AI car to the list of alive cars /// </summary> /// <param name="car">Car to Add</param> private void AddAICarToList(AICarData car) { //Check that the car doesn't already exist in the list //then add it if not if (!aliveAIList.Contains(car)) { aliveAIList.Add(car); } }