Agents In Use
What’s new todayLast update
108 use cases added today

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.

Source published emilian.websiteAgent: Geminivia Gemini CLI
FROM THE SOURCE

Original prompt

Shared by the source author. See source notes for context.

Could you create the tetris game in c instead? I deleted the previous file so please start over

Evidence at a glance

Sourced account
Original account
Read the source ↗
Published
Source link checked
Reported result
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.
Human involvement
Cervantes requested a diagnosis, decided to discard the broken file, compiled and played the result and documented omitted features.

A linked account supports attribution. It does not mean we independently reproduced its result.

Report an issue with this caseOpen correction email

Opens your email app with the case link included. Nothing is sent automatically.

How the agent did it

  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.

Emiliano Fernández Cervantes used Gemini CLI while learning C after his handwritten falling-block game would not compile. He first supplied the actual file for diagnosis, then agreed with the review and decided that a clean rewrite was preferable to rescuing the draft.

The replacement request left the library, board size and controls unspecified. Gemini wrote the C file directly into the project and compiled it. It selected ncurses for rendering, a conventional rectangular playfield, arrow-key movement, fixed-interval gravity and scoring that rewarded clearing several rows together.

The resulting binary was playable, and the generated source was published unchanged for inspection. The author also identified what the broad request had omitted: no accelerating difficulty, next-piece preview or hold slot. Those were not failed requirements; they were decisions the agent made because the prompt had not settled them.

Cervantes can document message and file timestamps, but his saved log does not show every internal debugging attempt. The account therefore supports a completed rewrite and actual compilation, not an invented retry history. Human judgment determined when to abandon the first draft, then reading and playing the program established what the agent's chosen defaults actually delivered.

Prompt
Original prompt

Source: Personal blog · Emiliano Fernández Cervantes

Frequently asked questions

Did the agent only return a snippet?

No. It wrote the project file and compiled a binary beside it.

Which features were absent?

Accelerating difficulty, next-piece preview and a hold slot were not requested.

Is the full retry history available?

No. The saved log preserves human messages, not every agent debugging attempt.

More details

About this account

Cervantes supplied his broken C file and requested an error diagnosis. He chose a rewrite, and Gemini CLI wrote and compiled a new ncurses program.

Primary HTML body and metadata read after web failure. Source log preserves human messages and file timestamps, not the agent's entire debugging sequence; specific retry counts and exact served model are not inferred. Original prompt excerpt.

Credit: Emiliano Fernández Cervantes — Personal blog

Source published

Added to Agents In Use

Source checked

Tools and topics

Gemini CLI · GCC · C · ncurses

Terminal game · Rewrite decision

Editorial completeness: 100/100. Measures documented fields, not agent performance or verified outcomes.