I built a terminal-based Speedrun Math game in Python using the curses library. The goal is simple: answer as many quick math problems as you can before time runs out. Every correct answer shrinks the time you get for the next one, so the pressure ramps the deeper you go.

Why curses?

A terminal game usually means typing a number and pressing Enter for every single answer. That kills the "speedrun" feel. The curses library gives you raw key input, so the player can type digits live, hit backspace to fix a mistake, and lock the answer with Enter only when ready.

How the game works

The core loop is just three things: