We break down how to turn “kinda works” into reproducible behavior: we build scenarios (input, boundaries, win/lose), lock down randomness via
debug mode, add targeted
println logs, catch “off-by-one” issues around
attempt
++ and
<= conditions, verify branching via
when, add safety checks with
require/
check, and use the basic debugger in IntelliJ IDEA (breakpoints, stepping, value inspection).