Module 6 · In Studio · challenge 2 of 2 in this lesson

formMatches puts full groups first, in join order

A test in Studio grades it and prints a pass code.

Open

Level 3, Professional

Challenge

Write the pure matchmaking rule in the learner file challenges/work/capstone_lobby.luau. Start from the m14-ship tag in the game repo. The written solution is in challenges/solutions/capstone.md.

Start from
The game at milestone m14 (download)
Grade it
In Studio, press Play, then run game.ServerScriptService.RunGameTests:Invoke("capstone_lobby", "memory-form-matches") in the server command bar. Copy the pass code from Output.

Done means

  • formMatches puts full groups first, in join order
  • A leftover group of at least minPlayers also starts
  • A user id in the queue twice counts once
  • It returns two values: the list of matches, and the ids still waiting
  • It does not change the table you pass in
  • challenges/capstone_lobby.luau prints TEST PASS for every check

The Course Runner prints this code when the test passes.