5 minutes
Rank the Hands and Find the Winner
The bus already tracks stacks, antes, and a pot. But the chips pile up and nothing decides who wins them: when betting ends, no code knows that a flush beats two pair, or how to break a tie between two players holding the same straight.
PokerHandEval picks the winner. It takes seven card ids, ranks the hands, and never touches the DOM or the 3D scene. It is fully deterministic, so the same cards always score the same way.

Add PokerHandEval to the Table entity
Add PokerHandEval to the existing Table entity. It already holds PokerBetting from Lesson 2:
emitResults: true makes the resolved event carry more detail. It sends the full per-seat result map, with hand names and descriptions. Without it, you only get the winner list.
Continue reading
Unlock the Full Course
Every lesson, the runnable examples, and the finished build — yours to keep.