# How to use Gemini to rewrite a terminal block game

Gemini CLI diagnosed a broken C game, then wrote and compiled a playable ncurses rewrite. The maker inspected default choices and documented omitted features.

Agent: Gemini (via Gemini CLI)
Tools: Gemini CLI, GCC, C, ncurses
Category: Games & simulation
Date: 2026-02-01

Outcome: Gemini wrote and compiled a playable terminal falling-block game, published with its source. Difficulty ramping, preview and hold were absent, and full retry history was not preserved.

## Steps

1. Cervantes supplied his broken C file and requested an error diagnosis.
2. He chose a rewrite, and Gemini CLI wrote and compiled a new ncurses program.
3. The author played the binary and inspected both the implemented defaults and omitted features.

Human oversight: Cervantes requested a diagnosis, decided to discard the broken file, compiled and played the result and documented omitted features.

Source: [Emiliano Fernández Cervantes — Personal blog](https://emilian.website/posts/tetris-in-c-with-ai-cli/)

Canonical URL: https://agentsinuse.com/use-cases/gemini-to-rewrite-a-broken-terminal-block-game/
