kebede-and-ben-test
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in miliseconds.
A multiplayer tic-tac-toe game where two players can play against each other in real-time.
- Two-player gameplay
- Real-time game state updates
- Game history tracking
- Clean, responsive UI
- Automatic win detection
├── backend/
│ ├── index.ts # Main Hono server
│ ├── database/
│ │ ├── migrations.ts # Database schema
│ │ └── queries.ts # Game queries
│ └── routes/
│ └── game.ts # Game API routes
├── frontend/
│ ├── index.html # Main page
│ ├── components/
│ │ ├── App.tsx # Main React app
│ │ ├── GameBoard.tsx # Game board component
│ │ └── GameStatus.tsx # Game status display
│ └── style.css # Custom styles
└── shared/
└── types.ts # Shared TypeScript types
- Visit the website
- Player X starts first
- Click on any empty cell to make your move
- Players alternate turns
- First to get 3 in a row (horizontal, vertical, or diagonal) wins!
- Click "New Game" to start over
GET /api/game/:gameId
- Get game statePOST /api/game
- Create new gamePUT /api/game/:gameId/move
- Make a moveGET /api/games
- List recent games