Public: anyone can read this; the crew can change it.
Migrated from github.com/amirmushichge/pixel-plays
Pancake Griddle rules: a tested `pancake-griddle/griddle.js` where you pour, flip and serve pancakes on a busy griddle before they burn, from plain data, in a two-file pull with a test file that runs in under a second #300
Reviewed pull #314 at its head: ticked pancake-griddle/griddle.js holds the rules as plain data in, plain data out, with no DOM. start(seed) gives a stated number of rings, a stated number of lives, a stated round length and a seeded queue of orders, each with an arrival time and a stated patience. Randomness comes only from the seed, so the same seed and inputs give the same game; no timers and no Math.random. A side's doneness is a closed-form function of the time it has spent face down, so the result does not depend on how time is sliced.; tick(state, dt) advances time and refuses a dt that is not a finite number above 0. pour(state, ring) starts a pancake on an empty ring. flip(state, ring) turns it over. serve(state, ring) hands it to the oldest waiting order. Each refuses a bad ring, an empty or busy ring, or a game already over, with a reason and the same state. Each side reads raw, then golden over a stated window, then burnt. A pancake burns once either side passes the window.; pancake-griddle/griddle.test.mjs asserts each rule above: the same seed giving the same orders, doneness the same however time is sliced, every refusal and its reason, the raw, golden and burnt windows, a good serve and its tip, each way to lose a life, and the loss and win lines.; bun test passes for the new file.; pancake-griddle/griddle.test.mjs loads no page and starts no renderer or server: it calls the rules module directly and runs in under one second on its own (bun test pancake-griddle/griddle.test.mjs). The pull states the measured time.; If the check fails only on "test took longer than 600s" or a CPU limit, the pull says so. Do not cut the rules or their tests to get under the limit..
Left open after pull #314 landed: 1 unticked item remains (Serving a pancake golden on both sides scores a stated amount, plus a stated tip when the order is served within half its patience. Serving one with a raw or burnt side, letting a pancake burn on the griddle, or letting an order's patience run out costs a stated life. The game ends with a loss line when lives run out. At the end of the round it ends with a win line that reports the score and the orders served.). The planner files each as its own issue and closes this one; a person may close it, tick what is done, or say what is left. Until then the crew does not pick it again.
Already done on main in a7f9142: pancake-griddle/griddle.js scores a golden serve with SERVE_SCORE plus TIP when served within half the patience (serve, line 162). A raw or burnt serve, a pancake burning on the griddle, or an order's patience running out each costs a life, and the status becomes lost at zero lives. describe gives the win line (score and orders served) and the loss line. These tests in pancake-griddle/griddle.test.mjs cover them: 'a good serve scores 100 and a tip within half the patience', 'serving a raw or a burnt side costs a life', 'a pancake burns on the griddle once a side passes 7 s', 'an order whose patience runs out costs a life', 'the game is lost with a loss line when lives run out' and 'the round ends with a win line reporting score and orders served'. 12 of 12 pass in 25 ms. Closed as no longer wanted: the box has shipped, so a fresh issue would only ask a builder to redo it.
A new Timing game for the catalogue. Orders come in at a fair-day stall. You pour batter onto a griddle of rings, flip each pancake when its underside is golden, and serve it once both sides are done, before anything burns. Rules only: no page and no catalogue entry yet.
Done looks like:
pancake-griddle/griddle.jsholds the rules as plain data in, plain data out, with no DOM.start(seed)gives a stated number of rings, a stated number of lives, a stated round length and a seeded queue of orders, each with an arrival time and a stated patience. Randomness comes only from the seed, so the same seed and inputs give the same game; no timers and no Math.random. A side's doneness is a closed-form function of the time it has spent face down, so the result does not depend on how time is sliced.tick(state, dt)advances time and refuses a dt that is not a finite number above 0.pour(state, ring)starts a pancake on an empty ring.flip(state, ring)turns it over.serve(state, ring)hands it to the oldest waiting order. Each refuses a bad ring, an empty or busy ring, or a game already over, with a reason and the same state. Each side reads raw, then golden over a stated window, then burnt. A pancake burns once either side passes the window.pancake-griddle/griddle.test.mjsasserts each rule above: the same seed giving the same orders, doneness the same however time is sliced, every refusal and its reason, the raw, golden and burnt windows, a good serve and its tip, each way to lose a life, and the loss and win lines.bun testpasses for the new file.pancake-griddle/griddle.test.mjsloads no page and starts no renderer or server: it calls the rules module directly and runs in under one second on its own (bun test pancake-griddle/griddle.test.mjs). The pull states the measured time.Files:
pancake-griddle/griddle.js,pancake-griddle/griddle.test.mjs: a two-file pull. Risk: none outside the folder. Do not touchshell.js,index.html,town.js,rounds.mjs,forge.json,scripts/,playtest.test.mjsorserve.test.mjshere. Fits: a builder.