Why
Round Robin is one of the easiest ways to rank N number of competitors in anything. For that reason, it will be our first case. The simplest form of this is to receive a list of names and generate the resulting list of matchups.
Acceptance Criteria
If I pass ["Will", "Bobby"] as my competitors, I receive a resulting JSON that tells me there'd be 1 matchup, and it's ["Will", "Bobby"]
If I pass ['Will', 'Bobby', 'Joe', 'Tommy', 'Jono'], I receive a resulting JSON that tells me there'd be 10 unique matchups
[["Joe", "Tommy"],
["Bobby", "Tommy"],
["Joe", "Will"],
["Tommy", "Will"],
["Bobby", "Jono"],
["Jono", "Will"],
["Bobby", "Will"],
["Joe", "Jono"],
["Jono", "Tommy"],
["Bobby", "Joe"]]
MVP Assumptions:
These fields will soon need to be variable, but let's build the thing with defaults for:
- Assume each player will face each other player 1v1. Soon we'll need a variable
competitors per matchup, allowing for a 4-player smash game for example.
- Assume each player will face each other player as specified above, but in only one match. Soon we'll need a variable
games in each matchup. For example: in the world cup, each team plays each other twice.
- Assume the inputs will only be player names, and no grouping into teams is required.