{
  "schemaVersion": 1,
  "slug": "truth-or-dare-generator-calculator",
  "category": "fun",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "277fd71c59a3157d5229c44ab6102eb974b8979c693b004e3e2e35ad2ee965e8",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/truth-or-dare-generator-calculator.json",
    "src/engine.js"
  ],
  "runtimeSource": "/sources/engine.txt",
  "runtimeHash": "5c888d8898afbdee36267bb9977829e1e2ac568f6677c8ee87469c139864645c",
  "scope": "The compute function records implemented equations, constants, lookup tables and custom rules. Inputs record defaults and allowed values; outputs record precision and units. Defaults are examples, not recommendations. General background references are not evidence for this specific algorithm.",
  "publishedFormula": {
    "formula": "type = mode=\"random\" → (u₁<0.5 ? Truth : Dare); i = ⌊u₂×5⌋ mod 5; prompt = pool[type,lvl][i]",
    "vars": [
      [
        "seed",
        "Random seed"
      ],
      [
        "mode",
        "Mode: truth / dare / random"
      ],
      [
        "lvl",
        "Intensity: mild or bold"
      ],
      [
        "u_k",
        "k-th pseudo-random number in [0,1)"
      ],
      [
        "i",
        "Selected prompt index"
      ],
      [
        "prompt",
        "Chosen prompt text"
      ]
    ],
    "note": "Mulberry32 PRNG: a₀=⌊seed⌋, a_k=(a_{k−1}+0x6D2B79F5) mod 2³², then a 32-bit mix yields u_k∈[0,1). Random mode consumes two numbers (type then prompt); fixed truth/dare consumes one. Each pool holds 5 prompts."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const T = { mild: ['What is the most embarrassing song you know all the words to?', 'What song always improves your mood?' , 'What harmless habit makes you laugh at yourself?' , 'What small thing would make today a little better?', 'What is a low-stakes skill you would like to learn?'], bold: ['What is a fictional place you would enjoy visiting?', 'What is a food combination you like that others might find unusual?', 'What is something you pretend to enjoy but do not?', 'What is a small everyday task you would happily never do again?', 'What is a song you would choose for a relaxed walk?'] }; const D = { mild: ['Speak in an accent until your next turn.', 'Invent a title for an imaginary book about this room.', 'Do twenty seconds of your worst dance.', 'Mime an everyday object for the group to guess, or pass.', 'Name three things in the room that share a color, or pass.'], bold: ['Give a dramatic weather report for the room.', 'Make up a two-line jingle about a nearby object.', 'Speak in rhyme until your next turn.', 'Do a silly dance move for ten seconds, or pass.', 'Give a sincere compliment to someone who opts in.'] }; const rng = (s) => { let a = Math.floor(s) >>> 0; return () => { a = (a + 0x6D2B79F5) >>> 0; let t = a; t = Math.imul(t ^ (t >>> 15), t | 1); t ^= t + Math.imul(t ^ (t >>> 7), t | 61); return ((t ^ (t >>> 14)) >>> 0)/4294967296; }; }; const r = rng(seed); const isTruth = mode === 'truth' ? true : mode === 'dare' ? false : r() < 0.5; const lvl = intensity === 'bold' ? 'bold' : 'mild'; const pool = isTruth ? T[lvl] : D[lvl]; const pick = pool[Math.floor(r()*pool.length) % pool.length]; return { prompt: pick, type: isTruth ? 'Truth' : 'Dare', intensityUsed: lvl };",
    "inputs": [
      {
        "name": "mode",
        "type": "select",
        "default": "truth",
        "options": [
          {
            "value": "truth"
          },
          {
            "value": "dare"
          },
          {
            "value": "random"
          }
        ]
      },
      {
        "name": "intensity",
        "type": "select",
        "default": "mild",
        "options": [
          {
            "value": "mild"
          },
          {
            "value": "bold"
          }
        ]
      },
      {
        "name": "seed",
        "type": "number",
        "default": 33,
        "min": 0,
        "max": 1000000,
        "step": 1
      }
    ],
    "outputs": [
      {
        "name": "prompt",
        "precision": 0,
        "unit": "",
        "type": "text"
      },
      {
        "name": "type",
        "precision": 0,
        "unit": "",
        "type": "text"
      },
      {
        "name": "intensityUsed",
        "precision": 0,
        "unit": "",
        "type": "text"
      }
    ],
    "interpret": null
  }
}
