How larikhalil/d20 works
Crypt of the D20 is a browser-based solitaire dungeon card game. Players choose a mode, then resolve cards in four-card rooms: combat, healing, and weapon choices change the run until the deck is exhausted or vitality reaches zero. Fleeing, undo, peek-next, scoring, and saved best scores add supporting game systems; the README also documents a tutorial, difficulty selection, responsive touch/keyboard controls, animations, and procedural audio. The source index identifies game.js as the core, but its excerpt is partial, so internal connections beyond visible behavior and README-described capabilities are limited.
Main entry points: game.js Mode Selection
Components 19
Run and Rules
- Mode Selection
game.js - Run State
game.js - Deck and Rooms
game.js - Card Resolution
game.js - Combat and Weapons
game.js - Potion Healing
game.js - Room Fleeing
game.js - Room Undo
game.js - Run Outcome
game.js
Interface and Effects
- Screens and Menus
game.js - Game Controls
game.js - Room Rendering
game.js - Card Illustrations
game.js - Tutorial Coach
game.js - Audio and Effects
game.js
Saved Progress
- Best Scores
game.js - Browser Storage
Other components
- Player
- Web Browser
Connections 19
- Player → Web Browser: plays in
README.md - Web Browser → Mode Selection: opens game
README.md - Mode Selection → Run State: starts run
game.js - Player → Game Controls: chooses actions
README.md - Game Controls → Card Resolution: resolves card
README.md - Card Resolution → Combat and Weapons: applies monster rules
game.js - Card Resolution → Potion Healing: applies healing
game.js - Run State → Deck and Rooms: tracks cards
game.js - Player → Room Fleeing: may flee
README.md - Player → Room Undo: may undo
README.md - Player → Tutorial Coach: follows guidance
README.md - Deck and Rooms → Run Outcome: exhaustion condition
README.md - Combat and Weapons → Run Outcome: vitality condition
README.md - Mode Selection → Best Scores: sets score tier
README.md - Best Scores → Browser Storage: saves locally
README.md - Web Browser → Screens and Menus: shows screens
game.js - Room Rendering → Card Illustrations: renders sprites
game.js - Room Rendering → Audio and Effects: plays feedback
game.js - Run State → Room Rendering: updates display
game.js