A simple Blackjack game with a leaderboard
- Features
- Technologies Used
- Project Structure
- Getting Started
- API Documentation
- Security Considerations
- Roadmap
- User authentication system (register/login/logout)
- Session management
- MySQL database integration
- Virtual currency system with initial 50 credit balance
- Transaction logging and monitoring
- Complete game logic following standard casino rules
- Intelligent dealer AI (hits on 16-, stands on 17+)
- Card scoring system:
- Face cards = 10
- Ace = 1 or 11 (dynamic)
- Number cards = face value
- Multiple win conditions:
- Natural blackjack (3:2 payout)
- Regular win (1:1 payout)
- Push and bust detection
- Configurable betting system
- Modern, responsive design
- Mobile-friendly layout
- Real-time balance updates
- Interactive game controls
- Strategic dealer card visibility
- Intuitive game messaging system
- Python 3.6+
- Flask web framework
- MySQL database
- HTML5/CSS3
CREATE TABLE users (
id INT PRIMARY KEY AUTO_INCREMENT,
username VARCHAR(255) NOT NULL UNIQUE,
password VARCHAR(255) NOT NULL,
money DECIMAL(10,2) DEFAULT 50.00
);| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Login page |
| POST | / |
Process login |
| GET | /register |
Registration page |
| POST | /register |
Process registration |
| GET | /logout |
Logout user |
| Method | Endpoint | Description |
|---|---|---|
| GET | /blackjack |
Main game view |
| GET | /blackjack/new |
Start new game |
| GET | /blackjack/hit |
Hit action |
| GET | /blackjack/stand |
Stand action |
- Clone the repository
git clone https://github.com/your-username/FaceId-gambling.git
cd FaceId-gambling- Install dependencies
pip install -r requirements.txt- Set up environment variables
cp .env.example .env
# Edit .env with your database credentials- Run the application
python app.py
⚠️ Note: This is currently a development version. For production deployment, implement:
- Password hashing
- Enhanced session management
- Rate limiting
- SQL injection protection
- CSRF protection
- HTTPS enforcement