Feat/scribel game#128
Open
SuhailShaik19 wants to merge 5 commits into
Open
Conversation
added 5 commits
June 11, 2026 19:11
- Extend Room model with game state (hostId, drawerId, secretWord, guesses, drawingData, score, playing/result statuses) - Add game logic: startGame, submitGuess (case-insensitive, scores 100), saveDrawing, clearDrawing, endRound, restartGame - Add POST routes: /start, /guess, /draw, /clear, /end-round, /restart - Add Zod validation schemas for all new endpoints - Reject empty/whitespace-only player names with clear message - Improve Zod error handler to surface first validation issue
- Add API methods: startGame, submitGuess, saveDrawing, clearDrawing, endRound, restartGame - Update RoomSnapshot type with hostId, drawerId, secretWord, guesses, drawingData, score, RoomStatus - Add HTTP polling to RoomStore (2s interval) with start/stopPolling - Add usePolling hook for lobby and game pages - Add store actions for all game operations
- DrawingCanvas: interactive canvas for drawer with mouse/touch support; guessers see synced drawing as image or waiting placeholder - GamePage: role-based UI — drawer sees secret word and canvas, guessers see guess form and synced drawing; result view shows word, scores, and full guess history; host restart button - LobbyPage: auto-polling, host badge, host-only start with 2-player minimum, auto-navigate to game on status change - GuessForm: wired to API with client-side empty-guess rejection - ResultPanel: displays correct word, correct guesser, all guesses - Scoreboard: shows live scores per participant - CSS: styles for canvas, guess list, result display, host badge, secret word banner, game states
Remove unnecessary 'peer: true' markers hoisted during npm install.
- discovery-notes.md: 8 incomplete behaviors, 4 assumptions, file list - speckit.constitution: engineering principles, AI rules, review discipline - speckit.specify: 4 feature groups with acceptance criteria and edge cases - speckit.plan: state model, data flow diagram, file-level implementation plan - speckit.tasks: ordered task list with dependencies across 10 phases (all complete) - reflection.md: comprehensive report on starter state, additions, and tradeoffs
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 full drawing game loop: room lobby with host controls,drawing canvas, guess submission, scoring, result state, and restart.
Contributor