Scribble lab#98
Open
Dhana-Dikonda wants to merge 7 commits into
Open
Conversation
- Extend RoomStatus to lobby | game | results (T002) - Add hostId to Room and RoomSnapshot models (T003, T004) - Fix frontend API base URL /bug suffix (T001, T005) - Tighten Zod name validation — reject empty/whitespace (T006, T012) - Add startRoomSchema for /start endpoint (T021) - Set hostId on room creation in createRoom() (T007) - Expose hostId in toRoomSnapshot() (T008) - Annotate displayName() fallback as dead code (T011a) - Add startRoom() with double-start guard (T022, FR-111) - Add POST /rooms/:code/start route handler (T024) - Add api.startGame() method (T025) - Add RoomStore.startGame() method (T026) - Add in-flight fetch guard to fetchRoom() (T020) - Rewrite LobbyPage: immediate mount fetch + silent polling (T017) - Auto-navigate on status === game (T018) - Poll error non-blocking display (T018a) - Host detection and Start Game button (T027) - Client-side blank name/code validation (T011, T015)
…log, results, and host restart flow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implement the core game loop, coordination logic, and UI components for the multiplayer drawing game ("Scribble"), covering Scenarios 1 through 4. All synchronization is handled via HTTP polling (no WebSockets) and state is maintained strictly in-memory.
Key Changes
room.hostId) on room creation./bug)."drawer"and all other players as"guesser".<DrawingCanvas>supporting touch/mouse coordinate tracking scaled to a reference 800x500 viewport, with real-time local drawing, redraw polling, and canvas clearing.POST /rooms/:code/guessesendpoint checking correctness case-insensitively.POST /rooms/:code/restartfor the host to reset status back to"lobby", zero scores, clear drawings/guesses, and redirect everyone back to the lobby page while preserving the player list.Contributor