<!-- Generated from applied-computing-au vic/unit3-4/sat/C08-2026/C08-Reference-Godot by port-reference-godot-to-wiki.py — do not hand-edit; re-run the port. --> # Debugging with Tetris — three practice bugs *Practise the C8-1 skills on a real Godot game before you use them on your own SAT project. Each exercise is a git branch with a seeded fault and a brief; the tools are covered in [Godot Debugging Tools](/sd/C08/Godot%20Debugging%20Tools) and [Debugging with Breakpoints in Godot](/sd/C08/Debugging%20with%20Breakpoints%20in%20Godot).* ## Setup (once) ``` git clone https://github.com/jeremy-oz/godot-tetris ``` Open the folder in **Godot 4.7**. Controls: arrows move, **Z / X** rotate, **Down** soft drop, **Space** hard drop, **C** hold. For each exercise: `git checkout <branch>`, then read **`C8-DEBUG-EXERCISE.md`** at the repo root — the brief changes with the branch. ## The three exercises | Branch | The story | Skill you practise | Rubric | |---|---|---|---| | `c8-debug-statements` | The score creeps up on its own — which line adds the phantom points? | **Debugging statements** — `print_debug` at each suspect site, read the Output panel | 3–4 | | `c8-debug-breakpoint` | The new Perfect Clear bonus never pays. | **Breakpoints** — pause the decision, Step Into, read the Locals panel | 5–6 | | `c8-debug-rectify` | The new IP validation lets rubbish through. | **The full cycle** — run a testing table, debug the failing rows, rectify, re-run, document corrective actions | 5–10 | Do them in order — each exercise assumes the tool from the one before. ## The loop these exercises teach Your [testing table](/sd/C08/Testing%20Tables%20and%20Corrections) and the debugger are one workflow, not two documents: **the table finds the failure → the debugger locates the fault → the Corrective Action column records what the debugger showed you → the re-run turns the row green.** Exercise 3 ends with a **narrated practice recording** of that loop — the same unbroken fix cycle your real C8-1 screen recording must show. > **Practice is not evidence.** Your C8-1 recording must show your **own SAT project** — your git log, your testing table, your code. A tetris recording earns exactly zero rubric levels; it just makes the real one easy. When a branch has beaten you (that's allowed): `git diff main` shows the seeded change. Look only after you've genuinely tried the tool — the diff answers *where*, but the exercise was *how to find where*.
