A strategic card game built with Vue 3 where you compete against an AI opponent to grow the most beautiful garden.
Be the first player to reach 20 points by playing flower cards to your table.
Flower Cards (score points when on your table):
| Flower | Points | Quantity |
|---|---|---|
| 🌹 Rose | 1 | 5 |
| 🌻 Sunflower | 3 | 5 |
| 🌼 Daisy | 5 | 5 |
| 🌷 Lily | 10 | 5 |
Action Cards (3 of each):
| Action | Effect |
|---|---|
| 💧 Water | Steal a flower from opponent's table |
| ✂️ Prune | Remove a flower from your own table |
| 🌱 Fertilize | Double a flower's points (max 15, once per card) |
| 🐛 Pest | Destroy a flower on opponent's table |
On your turn, you can:
- Play a card from your hand (flower goes to table, action targets a card)
- Draw a card from the deck (if hand has fewer than 5 cards)
- Maximum 5 cards in hand
- Maximum 5 flowers on table
| Level | Behaviors |
|---|---|
| Easy | Plays flowers, uses Pest and Fertilize |
| Medium | Also uses Water to steal valuable cards |
| Hard | Uses all cards + defensive play when you're near winning |
Test and tune AI strategies without playing manually:
In Browser Console:
runSim(100) // Run 100 AI vs AI games
runSim(1000) // Run 1000 games for better statisticsFrom Home Screen: Use the "AI vs AI Simulation" section to run batch tests with visual results.
- Vue 3 with Composition API (
<script setup>) - Pinia for state management
- Vue Router for navigation
- Vite for build tooling
- ESLint for code quality
src/
├── components/ # Vue components (Card, Hand, Table, Player)
├── data/ # Constants and configuration
├── managers/ # Game logic (GameLogicManager singleton)
├── stores/ # Pinia stores (players, deck, turn)
├── views/ # Route views (Home, Game, Rules)
└── style.css # Global styles
npm install # Install dependencies
npm run dev # Start dev server
npm run build # Production build
npm run lint # Run ESLint
npm run lint:fix # Auto-fix lint issues| File | Purpose |
|---|---|
src/managers/gameLogicManager.js |
Core game logic, AI strategy, simulation |
src/stores/players.js |
Player state (hand, table, score) |
src/stores/deck.js |
Deck creation and shuffling |
src/data/constants.js |
Game settings, difficulty config |
Recent balance changes:
- Fertilize capped at 15 points - Prevents Lily + Fertilize instant win
- One fertilize per card - Adds strategic depth
- AI uses all action cards - More competitive gameplay
Simulation results (500 games each, Hard difficulty):
- Win rates: ~47-52% (balanced)
- Average game length: 14 turns
- Draw rate: <1%
MIT