public static void AddUser(User user) { if (!Enter_users.Contains(user)) { Enter_users.Add(user); } }
public static void StartChessGames() { int max_i = Enter_users.Count() / 2; for (int i = 0; i < max_i; i++) { User user_1 = Enter_users.First(); Enter_users.Remove(user_1); User user_2 = Enter_users.First(); Enter_users.Remove(user_2); Events.Add(user_1.Email, next_id); Events.Add(user_2.Email, next_id); Game.Games.Add(new Game(user_1, user_2)); } }