# V3-09: Knock Early Drama ## Overview The "Knock Early" house rule lets players flip all remaining face-down cards (if 2 or fewer) to immediately trigger final turn. This is a high-risk, high-reward move that deserves dramatic presentation. **Dependencies:** None **Dependents:** None --- ## Goals 1. Make knock early feel dramatic and consequential 2. Show confirmation dialog (optional - it's risky!) 3. Dramatic animation when knock happens 4. Clear feedback showing the decision 5. Other players see "Player X knocked early!" --- ## Current State From `app.js`: ```javascript knockEarly() { if (!this.gameState || !this.gameState.knock_early) return; this.send({ type: 'knock_early' }); this.hideToast(); } ``` The knock early button exists but there's no special visual treatment. --- ## Design ### Knock Early Flow ``` 1. Player clicks "Knock Early" button 2. Confirmation prompt: "Reveal your hidden cards and go out?" 3. If confirmed: a. Dramatic sound effect b. Player's hidden cards flip rapidly in sequence c. "KNOCK!" banner appears d. Final turn badge triggers 4. Other players see announcement ``` ### Visual Elements - **Confirmation dialog** - "Are you sure?" with preview - **Rapid flip animation** - Cards flip faster than normal - **"KNOCK!" banner** - Large dramatic announcement - **Screen shake** (subtle) - Impact feeling --- ## Implementation ### Confirmation Dialog ```javascript knockEarly() { if (!this.gameState || !this.gameState.knock_early) return; // Count hidden cards const myData = this.getMyPlayerData(); const hiddenCards = myData.cards.filter(c => !c.face_up); if (hiddenCards.length === 0 || hiddenCards.length > 2) { return; // Can't knock } // Show confirmation this.showKnockConfirmation(hiddenCards.length, () => { this.executeKnockEarly(); }); } showKnockConfirmation(hiddenCount, onConfirm) { // Create modal const modal = document.createElement('div'); modal.className = 'knock-confirm-modal'; modal.innerHTML = `
You'll reveal ${hiddenCount} hidden card${hiddenCount > 1 ? 's' : ''} and trigger final turn.
This cannot be undone!