{"id":"recipe--logic","name":"Combine little questions","owner":"yeho","package":"recipes","kind":"recipe","signature":"start.yh","description":"Use and, or, and ! to express player rules.","context":"Sometimes one question is not enough. A door might need a key and a living player. A pause screen might open when a menu is visible or the player asks to pause. and requires both sides to be true. or needs at least one. ! flips a yes-or-no value. Read !paused as not paused.","parameters":[],"returns":"","members":[],"tags":["cpu","recipe"],"updated":"2026-09-09","source":{"repository":"demonhunterlabs","path":"app/lib/yeho-walkthrough.ts"},"status":"complete-program","notes":["Flip hasKey, alive, and paused one at a time. Predict whether the door opens before each run."],"examples":[{"id":"program","title":"Combine little questions","description":"Use and, or, and ! to express player rules.","code":"bool hasKey = true\nbool alive = true\nbool paused = false\nbool canOpen = hasKey and alive and !paused\nif canOpen { Console.Log(\"Come on in.\") }\nelse { Console.Log(\"The door stays closed.\") }","manifest":"manifestVersion = \"2\"\npackage = \"api.example.recipe__logic\"\nversion = \"0.1.0\"\nlanguageEdition = \"yeho-core-2026.1\"\n\n[app]\nkind = \"headless\"\n","tags":["cpu"],"run":"cpu-oracle","expected":"Come on in.","verification":"type checked","sha256":"dbc83c41c71058d4b559c3838bc71205f77001e352f9899e37d2210c2f180fdf","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null}],"searchTerms":[],"url":"https://demonhunterlabs.com/academy/api?item=recipe--logic","json":"https://demonhunterlabs.com/reference/items/recipe--logic.json","markdown":"https://demonhunterlabs.com/reference/text/recipe--logic.md"}
