namespace Core.Entities;

public class PartialTeam : Team
{
	public IList<Student> OmittedStudents { get; set; }

    public override Team CloneWithOmittedStudents(IEnumerable<Student> studentsToOmit)
	{
		var remainingStudents = Students.Where(s => !studentsToOmit.Contains(s)).ToList();
		var omittedStudents = OmittedStudents.Union(Students.Where(studentsToOmit.Contains)).Distinct().ToList();
		return new PartialTeam{Identifier = Identifier, Event = Event, Students = remainingStudents, OmittedStudents = omittedStudents };
	}
}