Scribble lab#93
Open
jyothiperla26 wants to merge 14 commits into
Open
Conversation
… for scribble-game
…me trimming (T005-T009)
…e (T010-T012, T016, T017)
…masking, and role display (T013-T018)
…scoring, and scoreboard/log updates (T019-T025)
… overlay (T026-T031)
…checklist (T032-T034)
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
This PR delivers a complete, playable multiplayer Scribble game on the starter scaffold. It implements all four lab scenarios—room setup and lobby, game start and drawer roles, interactive drawing and guessing, and result with host restart—using HTTP polling only, in-memory storage, and strict TypeScript validation.
The work follows the project constitution and Spec Kit workflow: discovery notes, constitution, distributed scenario specs under
specs/, incremental tasks, granular commits, and a reflection report.Out of scope (per lab): WebSockets, databases, authentication, drawer rotation, multi-round play, and random word packs.
Key Features & Changes
1. Room Management & Lobby (Scenario 1 —
specs/001-room-setup-lobby/)participantIdstored ashostIdon create.LobbyPage(replaces manual-only refresh).2. Game Start & Drawer Flow (Scenario 2 —
specs/002-game-start-drawer/)viewerRolein snapshots.secretWordmasked intoRoomSnapshotfor non-drawers; revealed to drawer only whileplaying.starterWords[sum(ASCII(roomCode)) % length]from seed list./lobby→/gamewhen status becomesplaying.POST /rooms/:code/start(host-only).3. Interactive Drawing & Guessing (Scenario 3 —
specs/003-gameplay-interaction/)<div>with interactive drawing onGamePage.800×500mapping so strokes align with the cursor across responsive layout.LineJSON (color,width,points) posted on stroke end and clear; guessers refresh via 2s polling.GuessFormwired to backend; trim + case-insensitive match; empty guesses rejected.result.POST /rooms/:code/draw,POST /rooms/:code/guess.4. Result & Restart (Scenario 4 —
specs/004-result-restart/)secretWordrevealed to all when status isresult; scoreboard and guess history viaScoreboard/ResultPanel.POST /rooms/:code/restartclears canvas, guesses, and scores; preserves participants; status →lobby./game→/lobbyafter restart.Foundation & Fixes
/bugsuffix infrontend/src/services/api.ts.Room/RoomSnapshotwith gameplay fields."Player"; whitespace-only input rejected.Spec Kit & Documentation
discovery-notes.mdspeckit.constitution,.specify/memory/constitution.mdspecs/001-scribble-game/specs/001-room-setup-lobby/…specs/004-result-restart/reflection.mdspecs/001-scribble-game/checklists/requirements.mdTechnical Integrity
roomStore.test.ts,schemas.test.ts).Verification Steps
cd backend && npm run dev) and frontend (cd frontend && npm run dev)./game; drawer sees word, guesser does not.cd backend && npm run test(expect 13 passing).npm run buildinbackend/andfrontend/.Contributor