cardamum
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data β all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v6View latest version
A real-time multiplayer UNO card game built with React and Val Town.
- Classic UNO gameplay with standard rules
- Real-time multiplayer functionality
- Game rooms for multiple concurrent games
- Special card actions (Skip, Reverse, Draw 2, Wild, Wild Draw 4)
- Visual card deck and player hands
- Turn management and game state synchronization
βββ backend/
β βββ index.ts # Main HTTP entry point
β βββ game.ts # Game logic and state management
β βββ room.ts # Room management for multiple games
βββ frontend/
β βββ components/
β β βββ App.tsx # Main React component
β β βββ Card.tsx # UNO card component
β β βββ GameBoard.tsx # Game board display
β β βββ PlayerHand.tsx # Player's cards display
β β βββ GameControls.tsx # Game action buttons
β βββ index.html # Main HTML template
β βββ index.tsx # Frontend entry point
βββ shared/
βββ types.ts # Shared type definitions
βββ constants.ts # Game constants and configurations
- Create or join a game room
- Wait for other players to join
- Play cards matching the top card's color or value
- Use special cards to skip turns, reverse direction, or make opponents draw cards
- Call "UNO" when you have one card left
- First player to play all their cards wins
- Players take turns playing cards that match the top card's color or value
- Special cards:
- Skip: Next player loses their turn
- Reverse: Reverses the direction of play
- Draw 2: Next player draws 2 cards and loses their turn
- Wild: Player chooses the next color to be played
- Wild Draw 4: Player chooses the next color, and the next player draws 4 cards and loses their turn
- If a player cannot play a card, they must draw from the deck
- Players must call "UNO" when they have one card left
- First player to play all their cards wins the round