public List <List <int> > Pair() { List <List <int> > Pairings = PairingSystem.Pair(Players); foreach (List <int> Pair in Pairings) { int white = Pair[0]; int black = Pair[1]; Player whitePlayer = Players.Find(p => p.ID == white); Player blackPlayer = Players.Find(p => p.ID == black); if (whitePlayer == null) { whitePlayer = Player.GetByePlayer(); } if (blackPlayer == null) { blackPlayer = Player.GetByePlayer(); } whitePlayer.Pair(blackPlayer); } return(Pairings); }
public void Pair() { PairingSystem.Pair(); }