Sound System: - Add soundStore with volume/mute persistence - Add useSound hook with Web Audio API fallback - Add SoundControl component for in-game volume adjustment - Play sounds for correct/incorrect, steal, timer, victory/defeat Team Chat: - Add TeamChat component with collapsible panel - Add team_message WebSocket event (team-only visibility) - Store up to 50 messages per session Emoji Reactions: - Add EmojiReactions bar with 8 emojis - Add ReactionOverlay with floating animations (Framer Motion) - Add rate limiting (1 reaction per 3 seconds) - Broadcast reactions to all players in room Admin Monitor: - Add Monitor page showing active rooms from Redis - Display player counts, team composition, status - Add ability to close problematic rooms Admin Settings: - Add Settings page for game configuration - Configure points/times by difficulty, steal penalty, max players - Store config in JSON file with service helpers CSV Import/Export: - Add export endpoint with optional filters - Add import endpoint with validation and error reporting - Add UI buttons and import result modal in Questions page Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
23 lines
719 B
Python
23 lines
719 B
Python
from pydantic import BaseModel
|
|
from typing import Dict
|
|
|
|
|
|
class GameSettingsSchema(BaseModel):
|
|
"""Schema for game configuration settings."""
|
|
points_by_difficulty: Dict[str, int]
|
|
times_by_difficulty: Dict[str, int]
|
|
steal_penalty_percent: int
|
|
max_players_per_team: int
|
|
steal_time_percent: int
|
|
|
|
class Config:
|
|
json_schema_extra = {
|
|
"example": {
|
|
"points_by_difficulty": {"1": 100, "2": 200, "3": 300, "4": 400, "5": 500},
|
|
"times_by_difficulty": {"1": 15, "2": 20, "3": 25, "4": 35, "5": 45},
|
|
"steal_penalty_percent": 50,
|
|
"max_players_per_team": 4,
|
|
"steal_time_percent": 50
|
|
}
|
|
}
|