2 hours
We have been tasked with developing a digital game for a client, focused on team matchmaking.
Spend at least 15 minutes reading and talking through the problem / potential solutions before jumping into code. Write stuff down, use a whiteboard or ask questions!
Once you're happy, get set up with your tech stack of choice, we mainly use NextJS or Laravel but please use whatever tech stack you are most comfortable with.
After you have finished your notes & planning, we encourage the use of AI tooling to work through the task, but you will be required to talk through your understanding of any generated code. This can be ChatGPT, Cursor, Claude Code, whatever you would use in your normal day to day workflow.
We need to be able to accommodate any number of teams and player numbers. Our test data has groups of 3-10 players divided into teams of 2. Each of these players needs to play a 1-on-1 game against a player from another team. Generate a list of match-ups for the given players.
- The teams will always be teams of 2 people.
- Players are not allowed to play against members of their own team.
- They cannot play the same person more than once.
- If there are an odd number of players, 1 player will be on a team by themself.
- Each player must play at least 1 game.
- Each player must not play more than 2 games.
- Landing page that displays at least one team configuration from the examples provided.
- Button to run the matchmaking algorithm.
- A view to show the solved matchmaking results.
- Unit test around the matchmaking function that passes for all the provided json test cases.