{
  "format": "duck-pack/0",
  "id": "night-field",
  "name": "Night field",
  "grades": "3 to 5",
  "grade_from": 3,
  "grade_to": 5,
  "vocabulary": "r001",
  "license": "CC-BY-4.0",
  "credit": "Duck Cards, from microduckstudio.com",
  "about": "A five by five field at night with a storm coming, where the fewest cards wins: find the bug in rows that turn the wrong way, end safely with Stop, and loop a whole field.",
  "cards": ["start", "end", "walk_forward", "walk_backward", "turn_left", "turn_right", "stop", "slow", "peck_ground", "alarm", "repeat", "end_repeat", "when_falls"],
  "score": "cards",
  "board": {"columns": 5, "rows": 5, "square_cm": 30, "duck_square_cm": 30, "duck_square_source": "duckbench simulator (Pollen's MJCF, alpha_walking), 2026-10-15, with a first spec past Pollen's pad envelope; the shipped spec is not measured yet, so on a real duck Walk and Turn cards are timed until Pollen's duck-sim and a tester's duck pass (docs/PACKS.md, Acceptance)"},
  "challenges": [
    {
      "id": "nf-1",
      "name": "Facing the dark",
      "start": {"at": [4, 0], "facing": "south"},
      "goal": [1, 2],
      "walls": [],
      "gates": [],
      "finish_with": null,
      "par": 6,
      "solution": [
        {"card": "walk_forward"},
        {"card": "walk_forward"},
        {"card": "turn_right"},
        {"card": "repeat", "times": 3},
        {"card": "walk_forward"},
        {"card": "end_repeat"}
      ],
      "buggy": [
        {"card": "walk_forward"},
        {"card": "walk_forward"},
        {"card": "turn_left"},
        {"card": "repeat", "times": 3},
        {"card": "walk_forward"},
        {"card": "end_repeat"}
      ],
      "hint": "Stand where the duck stands and face the way it faces. Now which way is right?",
      "note": "Someone laid this row in the dark, with the duck facing down the field. One turn goes the wrong way."
    },
    {
      "id": "nf-2",
      "name": "Storm walk",
      "start": {"at": [0, 4], "facing": "north"},
      "goal": [4, 0],
      "walls": [],
      "gates": [{"at": [1, 3], "axis": "ew"}, {"at": [2, 2], "axis": "ew"}, {"at": [3, 1], "axis": "ew"}, {"at": [4, 0], "axis": "ew"}],
      "finish_with": null,
      "par": 6,
      "solution": [
        {"card": "repeat", "times": 4},
        {"card": "walk_forward"},
        {"card": "turn_right"},
        {"card": "walk_forward"},
        {"card": "turn_left"},
        {"card": "end_repeat"}
      ],
      "buggy": [
        {"card": "repeat", "times": 4},
        {"card": "walk_forward"},
        {"card": "turn_left"},
        {"card": "walk_forward"},
        {"card": "turn_left"},
        {"card": "end_repeat"}
      ],
      "hint": "The loop is almost right. Act out the first time round and watch which way the duck faces at the end.",
      "note": "Wind is coming. The duck takes the stair path through four gates to the barn, but the loop is wrong."
    },
    {
      "id": "nf-3",
      "name": "Stop before the rain",
      "start": {"at": [0, 4], "facing": "north"},
      "goal": [3, 0],
      "walls": [],
      "gates": [],
      "finish_with": "stop",
      "par": 8,
      "solution": [
        {"card": "repeat", "times": 4},
        {"card": "walk_forward"},
        {"card": "end_repeat"},
        {"card": "turn_right"},
        {"card": "repeat", "times": 3},
        {"card": "walk_forward"},
        {"card": "end_repeat"},
        {"card": "stop"}
      ],
      "buggy": null,
      "hint": "Stop is a card and a step, and it counts. It goes last.",
      "note": "Rain is on the way. The duck walks to the barn door and ends with Stop, so everyone knows the row is over."
    },
    {
      "id": "nf-4",
      "name": "Round the barn",
      "start": {"at": [1, 1], "facing": "east"},
      "goal": [1, 1],
      "walls": [],
      "gates": [{"at": [3, 1], "axis": "ew"}, {"at": [3, 3], "axis": "ns"}, {"at": [1, 3], "axis": "ew"}],
      "finish_with": null,
      "par": 5,
      "solution": [
        {"card": "repeat", "times": 4},
        {"card": "walk_forward"},
        {"card": "walk_forward"},
        {"card": "turn_right"},
        {"card": "end_repeat"}
      ],
      "buggy": null,
      "hint": "The duck ends where it started. What part of the lap happens four times?",
      "note": "The duck walks a lap round the barn, through three gates, and comes home to the square it started on."
    },
    {
      "id": "nf-5",
      "name": "The whole night field",
      "start": {"at": [0, 0], "facing": "east"},
      "goal": [4, 4],
      "walls": [{"between": [[0, 0], [0, 1]]}, {"between": [[1, 0], [1, 1]]}, {"between": [[2, 0], [2, 1]]}, {"between": [[3, 0], [3, 1]]}, {"between": [[1, 1], [1, 2]]}, {"between": [[2, 1], [2, 2]]}, {"between": [[3, 1], [3, 2]]}, {"between": [[4, 1], [4, 2]]}, {"between": [[0, 2], [0, 3]]}, {"between": [[1, 2], [1, 3]]}, {"between": [[2, 2], [2, 3]]}, {"between": [[3, 2], [3, 3]]}, {"between": [[1, 3], [1, 4]]}, {"between": [[2, 3], [2, 4]]}, {"between": [[3, 3], [3, 4]]}, {"between": [[4, 3], [4, 4]]}],
      "gates": [{"at": [4, 0], "axis": "ew"}, {"at": [0, 1], "axis": "ew"}, {"at": [4, 2], "axis": "ew"}, {"at": [0, 3], "axis": "ew"}, {"at": [4, 4], "axis": "ew"}],
      "finish_with": null,
      "par": 17,
      "solution": [
        {"card": "repeat", "times": 2},
        {"card": "repeat", "times": 4},
        {"card": "walk_forward"},
        {"card": "end_repeat"},
        {"card": "turn_right"},
        {"card": "walk_forward"},
        {"card": "turn_right"},
        {"card": "repeat", "times": 4},
        {"card": "walk_forward"},
        {"card": "end_repeat"},
        {"card": "turn_left"},
        {"card": "walk_forward"},
        {"card": "turn_left"},
        {"card": "end_repeat"},
        {"card": "repeat", "times": 4},
        {"card": "walk_forward"},
        {"card": "end_repeat"}
      ],
      "buggy": null,
      "hint": "Two rows make one pattern. Repeat that pattern, then add the last row on its own.",
      "note": "Every row of the field, end to end, through the gate at each row end, before morning."
    }
  ],
  "lessons": [
    {
      "title": "Find the bug in the dark",
      "skill": "Debugging",
      "body": "Hand out the buggy rows for Facing the dark and Storm walk. Groups act each one out, find the one wrong card, and fix the row with a single swap. In Storm walk the wrong card sits inside a loop.",
      "ask": "Why does one wrong card inside a loop go wrong more than once?"
    },
    {
      "title": "End it safely",
      "skill": "Safe endings",
      "body": "Stop before the rain ends with Stop. On the board Stop moves nothing, but it is a card and a step, and it counts. Talk about why a machine that has finished should end standing still, in a place people know.",
      "ask": "Why does it help everyone to know where the duck is when the row ends?"
    },
    {
      "title": "Who decides about the storm?",
      "skill": "Decisions",
      "body": "A row of cards cannot see the sky. In chapter 1 of The Duck Who Stayed, the manual says: Pip does not look. Pip just goes. On a farm a person watches the weather and decides when to bring people, animals and machines in. List what a person can see and hear before a storm.",
      "ask": "What can a person notice about a storm that a row of cards cannot?"
    },
    {
      "title": "When it falls",
      "skill": "Events",
      "body": "A When it falls row is what the duck does once it is back on its feet. The board does not play it, but a duck running your row would. Write one with Alarm and Stop for the night field, and test it by having the student playing the duck sit down when you say fall.",
      "ask": "After a fall in the dark, should the duck carry on, or stop and call?"
    },
    {
      "title": "We can know that",
      "skill": "Evidence",
      "body": "Run a row and keep a log like Wren's: Look, what the duck did; Tried, what you changed; Heard, the sounds it made. The duck makes sounds; what a sound means is a person's guess. Write only what someone else could check, and keep guesses on their own line.",
      "ask": "Which lines in your log could another group check?"
    },
    {
      "title": "The whole night field",
      "skill": "Nested loops",
      "body": "The whole night field takes 17 cards and 32 steps, with a Repeat inside a Repeat. Print 4 Repeat and 4 End repeat cards for each group. Unroll the row on paper, every step in order, and count them. Then try to find a row shorter than 17 cards.",
      "ask": "How many steps does the duck take for each card you laid?"
    }
  ],
  "yours": []
}
