A unique twist on the classic Blackjack game where you play as the Casino Dealer! Your objective is to make the house win against a PC-controlled player by strategically deciding the player's moves and playing your own hand according to standard dealer rules.
Unlike traditional blackjack games where you try to beat the dealer, House Advantage flips the script:
- You are the Casino Dealer - Play according to dealer rules (hit on 16, stand on 17)
- Strategic Decision Making - Decide the PC player's moves to maximize house advantage
- Authentic Casino Experience - Experience the game from the house's perspective
Run the automated setup script that handles everything for you:
python run.py
This script will:
- ✅ Check if dependencies are installed (
node_modules
) - 📦 Run
npm install
if necessary - 🚀 Launch
npm run dev
in a new terminal - ⏳ Wait for the development server to be ready
- 🌐 Automatically open your browser to
http://localhost:5173/
If you prefer to set up manually:
# Install dependencies
npm install
# Start development server
npm run dev
Then open your browser and navigate to http://localhost:5173/
house-advantage/
├── components/ # React components
├── hooks/ # Custom React hooks
├── utils/ # Utility functions
├── .env.local # Environment variables
├── .gitignore # Git ignore rules
├── App.tsx # Main application component
├── constants.ts # Game constants and configurations
├── index.html # HTML entry point
├── index.tsx # React entry point
├── metadata.json # Project metadata
├── package.json # NPM dependencies and scripts
├── README.md # This file
├── run.py # Automated setup script
├── tsconfig.json # TypeScript configuration
├── types.ts # TypeScript type definitions
└── vite.config.ts # Vite configuration
- Frontend Framework: React with TypeScript
- Build Tool: Vite
- Styling: Modern CSS (component-based)
- Game Logic: Custom TypeScript implementation
- Development: Hot module replacement for fast development
- Start the Game - Launch the application using the quick start methods above
- Understand Your Role - You are the casino dealer, not the player
- Make Strategic Decisions - Choose the PC player's moves to benefit the house
- Follow Dealer Rules - Play your own hand according to standard casino dealer rules
- Maximize House Advantage - Your goal is to make the casino win!
- Authentic Blackjack Rules - Standard casino blackjack gameplay
- Dealer Perspective - Unique gameplay from the house's point of view
- Strategic Gameplay - Balance risk and reward to maximize house wins
- Clean UI - Intuitive interface built with modern web technologies
- Real-time Updates - Smooth gameplay with instant feedback
npm run dev
- Start development servernpm run build
- Build for productionnpm run preview
- Preview production build locally
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is open source and available under the MIT License.
House Advantage offers a fresh perspective on the classic casino game by putting you in the dealer's shoes. Experience the strategic depth of managing risk from the casino's perspective while enjoying smooth, modern web-based gameplay.
Ready to deal? Run python run.py
and start your career as a casino dealer! 🃏