// === STORY BUILDER GAME - CONSTRUCTEUR D'HISTOIRES === class StoryBuilderGame { constructor(options) { this.container = options.container; this.content = options.content; this.contentEngine = options.contentEngine; this.onScoreUpdate = options.onScoreUpdate || (() => {}); this.onGameEnd = options.onGameEnd || (() => {}); // État du jeu this.score = 0; this.currentStory = []; this.availableElements = []; this.storyTarget = null; this.gameMode = 'sequence'; // 'sequence', 'dialogue', 'scenario' // Configuration this.maxElements = 6; this.timeLimit = 180; // 3 minutes this.timeLeft = this.timeLimit; this.isRunning = false; // Timers this.gameTimer = null; this.init(); } init() { this.createGameBoard(); this.setupEventListeners(); this.loadStoryContent(); } createGameBoard() { this.container.innerHTML = `
Choisis un mode et commençons !