A 3D blackjack game built with React, TypeScript, Three.js (via React Three Fiber), and Zustand.
The project is already scaffolded with:
- β Vite + React 19 + TypeScript
- β All dependencies installed (Three.js, React Three Fiber, Drei, React Spring, Zustand)
- β Folder structure created
- β TypeScript configured
Open IMPLEMENTATION_PROMPT.md and use it with Claude or another AI to generate all the implementation code at once. The prompt includes:
- Complete implementation details for all files
- Code snippets for every component
- Game logic (deck, rules, dealer AI)
- Zustand store setup
- 3D components (Scene, Table, Card, Hand)
- UI components (Controls, Scores, Status)
- Styling
Simply copy the contents of IMPLEMENTATION_PROMPT.md and paste it into your AI assistant.
Follow the file structure in IMPLEMENTATION_PROMPT.md and implement each component step by step.
src/
βββ game/
β βββ types.ts # Card, Suit, Rank types
β βββ deck.ts # Deck creation & shuffling
β βββ rules.ts # Blackjack scoring logic
β βββ dealer.ts # Dealer AI
βββ store/
β βββ gameStore.ts # Zustand game state
βββ components/
β βββ Scene.tsx # Main 3D canvas
β βββ Table.tsx # Green felt table
β βββ Card.tsx # 3D card component
β βββ Hand.tsx # Card collection
β βββ UI/
β βββ GameControls.tsx
β βββ ScoreDisplay.tsx
β βββ GameStatus.tsx
βββ App.tsx
βββ App.css
# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview- React 19 - UI framework
- TypeScript - Type safety
- Vite - Build tool
- Three.js - 3D graphics
- @react-three/fiber - React renderer for Three.js
- @react-three/drei - Useful Three.js helpers
- @react-spring/three - Physics-based animations
- Zustand - State management
- β Basic blackjack rules (Hit/Stand)
- β Single player vs dealer
- β 3D card rendering with flip animations
- β Automatic dealer AI (hits on <17)
- β Score tracking
- β Win/loss detection
Estimated 2-hour implementation:
- Hour 1: Game logic + Zustand store + Basic 3D scene
- Hour 2: Card components + UI + Polish
- Read
IMPLEMENTATION_PROMPT.md - Generate all the code using the prompt with an AI assistant
- Run
npm run dev - Play blackjack at
http://localhost:5173
Good luck! π°