51 lines
1.2 KiB
Markdown
51 lines
1.2 KiB
Markdown
# Number Guessing Game 🎯
|
|
|
|
A web-based number guessing game using binary representation magic!
|
|
|
|
## Quick Start with Docker
|
|
|
|
### Option 1: Using Docker Compose (Recommended)
|
|
```bash
|
|
docker-compose up -d
|
|
```
|
|
|
|
### Option 2: Using Docker directly
|
|
```bash
|
|
# Build the image
|
|
docker build -t guess-number-game .
|
|
|
|
# Run the container
|
|
docker run -d -p 8080:80 --name guess-number-app guess-number-game
|
|
```
|
|
|
|
## Access the App
|
|
|
|
Open your browser and go to: http://localhost:8080
|
|
|
|
## How it Works
|
|
|
|
The game uses binary representation to guess numbers 1-100 in exactly 7 questions:
|
|
- Each group represents a power of 2 (1, 2, 4, 8, 16, 32, 64)
|
|
- When someone says "yes" to a group, add that group's value
|
|
- Sum all "yes" values to get their number
|
|
|
|
## Deployment Options
|
|
|
|
### Local Development
|
|
- Just open `index.html` in your browser
|
|
|
|
### Production Deployment
|
|
- **Docker**: Use the provided Docker setup
|
|
- **Static Hosting**: Deploy to Netlify, Vercel, or GitHub Pages
|
|
- **Web Server**: Serve with nginx, Apache, or any static file server
|
|
|
|
## Stopping the Docker Container
|
|
|
|
```bash
|
|
# If using docker-compose
|
|
docker-compose down
|
|
|
|
# If using docker run
|
|
docker stop guess-number-app
|
|
docker rm guess-number-app
|
|
``` |