No description
| cmd/go-fish | ||
| internal | ||
| web/templates | ||
| .gitignore | ||
| go.mod | ||
| go.sum | ||
| Makefile | ||
| README.md | ||
Go Fish
A web-based implementation of the classic Go Fish card game.
Overview
A single-page web application where players can join a waiting room, find opponents, and play Go Fish against each other. Players already in a game are marked as unavailable in the waiting room.
Features
- Waiting room: View other online players, unavailable players marked in red
- Matchmaking: Click on available players to start a game
- Go Fish gameplay: Ask opponents for ranks, draw from deck if unavailable
- Book collection: Collect sets of 4 cards (books)
- Win condition: First player to collect 13 books wins
Getting Started
Prerequisites
- Go 1.21 or later
Installation
# Clone the repository
git clone <repo-url> go-fish
cd go-fish
# Build the application
make build
# Or run directly
make run
The application will start on http://localhost:3000
Running
make run
Or build and run manually:
./go-fish
How to Play
- Open your browser and navigate to
http://localhost:3000 - Click "Join Waiting Room" to enter the waiting area
- See other players - those with green backgrounds are available
- Players already in a game appear with red backgrounds
- Click on an available player to be matched and start a game
- Use the rank buttons (A, 2, 3, ..., K) to ask your opponent for cards
- Collect sets of 4 matching cards (books)
- First to 13 books wins!
Game Rules
- Each player starts with 7 cards from a standard 52-card deck
- On your turn, ask your opponent for a specific rank (A, 2-10, J, Q, K)
- If the opponent has the rank, they must give you all cards of that rank
- If the opponent doesn't have the rank, say "Go Fish" and you draw from the deck
- Collect 4 of a kind to score a book
- First player to 13 books wins