Multiplayer Word Game

A real-time multiplayer word game where players compete to spot words from a shared pool of letter tiles.

How to Play

  1. Two players join the game by entering a game ID and their name
  2. A pool of 30 letter tiles starts face down in the center
  3. Players take turns flipping tiles to reveal letters
  4. When you spot a word using the revealed letters, select the tiles and submit the word
  5. If you're first to submit a valid word, you claim those letters and score points
  6. The game continues until all tiles are flipped or no more words can be made
  7. Player with the highest score wins!

Project Structure

  • backend/ - Hono API server with REST endpoints for game actions
  • frontend/ - React-based game interface with polling for updates
  • shared/ - Shared types and utilities

Features

  • ✅ Turn-based tile flipping
  • ✅ Word validation (3+ letters)
  • ✅ Live scoring with Scrabble-like point values
  • ✅ Game state synchronization via polling
  • ✅ Responsive design with TailwindCSS
  • ✅ Visual feedback for tile selection and game state

API Endpoints

  • POST /api/games/{gameId}/join - Join a game
  • GET /api/games/{gameId} - Get current game state
  • POST /api/games/{gameId}/flip - Flip a tile (must be your turn)
  • POST /api/games/{gameId}/claim - Claim a word using selected tiles

Tech Stack

  • Backend: Hono with REST API
  • Frontend: React with polling updates
  • Storage: In-memory (games reset on server restart)
  • Styling: TailwindCSS

Getting Started

  1. Visit the game URL
  2. Enter a game ID (any string, e.g., "room1")
  3. Enter your player name
  4. Share the game ID with a friend
  5. Start playing when both players have joined!