How costards2/causa_ganha_-vn_minigame- works
This is a browser-based Portuguese legal-training visual novel: the learner reads a client scenario, answers a quiz question, receives feedback, and progresses toward a score-based ending. The main runtime is in js/script.js; the supplied excerpts show question loading, dialogue, quiz, timer, sprites, and partial-progress reporting. Some wiring and completion behavior are unsampled, so the graph omits uncertain links.
Main entry points: script.js Game controller · index.html Game page · platform-bridge.js Cayres bridge · styles.css Visual styling
Components 17
Game flow
- Game page
index.html - Game controller
js/script.js - Dialogue scenes
js/script.js - Quiz questions
js/script.js - Answer feedback
js/script.js - Timer and score
js/script.js - Game ending
js/script.js
Presentation
- Visual styling
css/styles.css - Character sprites
img/adv sprites - Intern sprites
img/stg sprites - Click sound
audio/click.mp3 - Correct sound
audio/acerto.mp3 - Incorrect sound
audio/erro.mp3
Game content
- Question data
data/questions.json
Platform integration
- Cayres bridge
js/platform-bridge.js - Platform SDK
Other components
- Learner
Connections 16
- Learner → Game page: opens and plays
- Game page → Game controller: loads
- Game controller → Question data: fetches
- Game controller → Dialogue scenes: loads scene
- Dialogue scenes → Quiz questions: advances to
- Quiz questions → Answer feedback: checks answer
- Game controller → Timer and score: updates
- Game controller → Game ending: ends game
- Game controller → Cayres bridge: reports progress
- Cayres bridge → Platform SDK: updates progress
- Game controller → Visual styling: uses
- Game controller → Character sprites: loads
- Game controller → Intern sprites: loads
- Game controller → Click sound: plays
- Quiz questions → Correct sound: plays on correct
- Quiz questions → Incorrect sound: plays on incorrect