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 and Debugging with Breakpoints in Godot.

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 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.

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9