Skip to content

Assignment#18

Open
cheppali-kalyani wants to merge 7 commits into
everest-engineering:mainfrom
cheppali-kalyani:assignment
Open

Assignment#18
cheppali-kalyani wants to merge 7 commits into
everest-engineering:mainfrom
cheppali-kalyani:assignment

Conversation

@cheppali-kalyani
Copy link
Copy Markdown

@cheppali-kalyani cheppali-kalyani commented May 30, 2026

Summary

This PR implements the full Scribble multiplayer drawing game using Spec Kit methodology (specification-driven development). The work was done incrementally across 4 scenarios with granular commits:

Spec Kit Artifacts:

  • Discovery notes documenting 7 incomplete behaviors and 3 assumptions
  • Constitution with engineering principles, AI usage rules, and game constraints
  • Specification with acceptance criteria and edge cases for all 4 scenarios
  • Technical plan with state model changes and file-level modifications
  • Ordered task list with dependencies tracked per scenario

Scenario 1 — Room Setup & Lobby:

  • Host tracking (hostId stored on room creation, host badge in lobby UI)
  • Client-side name/code validation on create and join forms
  • Auto-polling (2s interval) in lobby and game page
  • Host-only start button, disabled until 2+ players present
  • Fixed /bug suffix bug in API base URL

Scenario 2 — Game Start & Drawer Flow:

  • Drawer assignment (host becomes drawer on game start)
  • Deterministic word selection (STARTER_WORDS[participantCount % 5])
  • Role-based word visibility (only drawer sees secret word during play)

Scenario 3 — Gameplay Interaction:

  • Interactive HTML5 <canvas> with mouse drawing and debounced sync
  • Clear canvas functionality with backend propagation
  • Guess submission with validation and case-insensitive comparison
  • Deterministic scoring (100pts for correct, 0 otherwise)
  • Real-time scoreboard and guess history via polling

Scenario 4 — Result, Restart & Final Validation:

  • Result state revealing secret word to all players
  • Host-only restart with full state reset (scores, drawing, guesses)
  • Participants and host preserved across restarts

Backend: 9 REST endpoints (rooms CRUD, start, draw, clear, guess, restart), Zod validation, in-memory store.
Frontend: 6 React pages with custom polling-based state management (useSyncExternalStore).

Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant