← Questions

Turn-based monster team battle simulator

0
OpenAIMetaCodingLast asked Aug 2026

A coding interview question asked in OpenAI's agentic coding (beta) round and at Meta, last asked Aug 2026. It tests simulation, object-oriented design and game logic.

Write a deterministic simulator for a turn-based battle between two ordered teams of monsters, and return the battle log and the result. Log every event in order: each monster sent out, each round number, each strike with the defender's…

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

  • OpenAI · Agentic coding (beta) · Last asked Aug 2026An existing codebase and changes too large to write by hand; you work through them with an AI coding agent · An AI coding agent is expected
  • Meta · Technical phone screen · Last asked May 202645 min · Two coding problems in CoderPad, about 20 minutes each · Usually no AI; some newer screens are AI-assisted

What it tests

simulation · object-oriented design · game logic

Your code and the AI tutor open when you unlock this question.