860 B
860 B
2025-12-16 - Draft Rules and Logic Implementation
Draft Minimum Players
- Added backend check in
index.tsto prevent drafting with fewer than 4 players. - Emit
draft_errorto room if condition is not met. - Added
draft_errorlistener inGameRoom.tsxto notify users.
4-Player Draft Rules (Pick 2)
- Modified
DraftManager.ts:- Added
pickedInCurrentStepto track picks within a single pack pass cycle. - Implemented logic in
pickCard:- If 4 players: Require 2 picks before passing pack.
- Else: Require 1 pick.
- Logic handles pack exhaustion (if pack runs out before picks completed, it passes).
- Added
Robustness
- Updated
rejoin_roomhandler inindex.tsto send the currentdraftstate if the room is indraftingstatus. This allows users to refresh and stay in the draft flow (critical for multi-pick scenarios).