const p={dialogType:"story",checkWinCondition:(n,i,d={},e={})=>{if(console.log("🏆 WIN CONDITION DEBUG - Stored Blockly Moves:",{storedBlocklyMoves:e.blocklyMoves||[],storedGeneratedCode:e.generatedCode||"No code stored",playerPosition:e.playerPosition,checkpointsCompleted:i,allBlocklyMoves:n||[]}),!i)return console.log("❌ WIN CONDITION FAILED: Checkpoints not completed"),!1;const a=e.playerPosition&&e.playerPosition.x===4&&e.playerPosition.z===20,l=e.blocklyMoves?.filter(t=>t.type==="sound"&&t.value==="MEOW").length||0,s=l>=1;return console.log("🎯 WIN CONDITION VERIFICATION:",{playerPosition:e.playerPosition,playerAtTarget:a,meowSoundCount:l,hasEnoughMeowSounds:s,checkpointsCompleted:i,totalMoves:e.blocklyMoves?.length||0,requiredMeowSounds:3}),i&&a&&s?(console.log("🎉 WIN CONDITION PASSED! 🏆"),console.log("   ✓ All checkpoints completed"),console.log("   ✓ Player at position (4, 20)"),console.log(`   ✓ Used MEOW sound ${l} time(s) (required: 3)`),!0):(console.log("❌ WIN CONDITION FAILED:"),i||console.log("   ❌ Checkpoints not completed"),a||console.log("   ❌ Player not at target position (4, 20)"),s||console.log(`   ❌ Not enough MEOW sounds (used ${l}, required 3)`),!1)},blockValidator:(n,i,d={},e={})=>{console.log("Validating WIN block sequence for Game 1 Level 7:",n);const a=n.filter(o=>o.type==="move"||o.type==="speed").map(o=>`${o.type==="speed"?"speed":"move"}:${o.value}`);console.log("Movement + speed blocks (in order):",a);const l=["move:right","move:forward","move:forward","move:forward","move:forward","move:forward","move:forward","move:right","move:forward","move:forward"],s=a.filter(o=>o.startsWith("move:")).map(o=>o);console.log("Pure move sequence (speed skipped for validation):",s);const r=s.length>=l.length&&l.every((o,g)=>s[g]===o),t=n.some(o=>o.type==="sound"&&o.value==="MEOW"),c=n.some(o=>o.type==="dialogue"&&o.value==="Mia.. Miaaaa..");return r&&t&&c?(console.log("WIN BLOCK VALIDATION PASSED!"),console.log(`   Movement prefix: ${s.slice(0,10).join(" → ")}`),console.log("   MEOW sound: Found"),console.log('   Dialogue "Mia.. Miaaaa..": Found'),!0):(console.log("WIN BLOCK VALIDATION FAILED:"),r||(console.log(`   Expected movement prefix (${l.length} moves):`),console.log(`     ${l.join(" → ")}`),console.log(`   Got (${s.length} moves):`),console.log(`     ${s.slice(0,l.length).join(" → ")}`)),t||console.log("   Missing 'sound:MEOW' block"),c||console.log("   Missing 'dialogue:Mia.. Miaaaa..' block"),!1)},dialogues:[{speaker:"Rob",message:"Mia!",characterDirection:"left",dialogType:"story",image:"images/ROB_Dialogue_Head.webp"},{speaker:"Rob",message:"Cepat, bantu saya kejar Mia sebelum dia sembunyi lagi sekali",characterDirection:"left",dialogType:"story",image:"images/ROB_Dialogue_Head.webp"}]};export{p as winConfig};
