Skip to content

Scribble assignment#124

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

Scribble assignment#124
riyaz-everest wants to merge 7 commits into
everest-engineering:mainfrom
riyaz-everest:assignment

Conversation

@riyaz-everest

Copy link
Copy Markdown

Summary

What changed:

  1. Room Setup & Lobby — Players can create/join rooms with 4-character codes; lobby shows participants and handles polling for updates
  2. Game Start — Host starts the game once 2+ players are present; word is selected deterministically via DJB2 hash; drawer is assigned
  3. Gameplay — Drawer draws on an HTML5 Canvas (strokes + clear), guessers submit text guesses (case-insensitive), scoring is 100pts for correct / 0 for incorrect
  4. Round Results & Restart — When all guessers guess correctly, the room transitions to a results screen showing the word, ranked scores, and full guess history. Host can restart, clearing round data while keeping participants
  5. Bug fix — API_BASE_URL typo corrected (/bug → empty)
  6. Documentation — Project constitution added

Contributor

- Add CanvasAction/GuessEntry types, extend Room/RoomSnapshot
- POST /:code/canvas endpoint (drawer-only guard)
- POST /:code/guess endpoint (case-insensitive comparison)
- Scoring: 100pts correct, 0 incorrect, duplicate rejection
- Round-end detection (roundOver flag)
- DrawingCanvas component with native HTML5 Canvas API
- GuessForm wired with correct/incorrect feedback
- Scoreboard and ResultPanel wired to live state
- 85 backend tests, 7 frontend tests, clean TypeScript
…oiner support

- Add "results" status to RoomStatus type and toRoomSnapshot()
- Auto-transition to results when all guessers score 100 in submitGuess()
- Create ResultsView component and ResultsPage with correct word, ranked
  scores, and full guess history
- Add /results route with auto-navigation from GamePage on results
- Implement restartGame() service with host-only authorization
- Add POST /:code/restart endpoint and schema
- Add restartRoom() API function and roomStore action
- Add host-only restart button with inline error handling on ResultsPage
- Update LobbyPage with results indicator and polling transition
- Add integration tests for restart endpoint (200/403/400/404)
- Add late joiner tests for results and post-restart lobby state
- Update GamePage test for results status navigation
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