Class TournamentSchedulers
java.lang.Object
org.episteme.social.sports.TournamentSchedulers
Provides mathematical algorithms for scheduling sports competitions, including
Round Robin, Single Elimination, and Swiss System pairings.
- Since:
- 1.0
- Version:
- 1.1
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordDetails of a scheduled match within a tournament structure. -
Method Summary
Modifier and TypeMethodDescriptiongenerateRoundRobin(List<Team> teams) Generates a complete Round Robin schedule for the given teams.Generates pairings for a Swiss System tournament round based on current scores.
-
Method Details
-
generateRoundRobin
Generates a complete Round Robin schedule for the given teams. Uses the Circle Method algorithm.- Parameters:
teams- the participating teams- Returns:
- a list of scheduled matches for all rounds
-
generateSwissRound
public static List<TournamentSchedulers.ScheduledMatch> generateSwissRound(List<Team> teams, Map<Team, Integer> currentScores, int roundNumber) Generates pairings for a Swiss System tournament round based on current scores.- Parameters:
teams- list of all teamscurrentScores- mapping of each team to their current pointsroundNumber- the current round index- Returns:
- pairings for this round
-