Start by clarifying requirements and defining the core domain model (Monster, Team, Battle, Turn) with clear responsibilities and extensibility points. Then outline the battle loop, turn order, action resolution, and logging, and finally discuss implementation details, edge cases, and testing.
Pro tip: Emphasize separation of concerns: keep battle logic independent of logging and I/O, and use dependency injection for randomness and time to make the system testable and deterministic.
Ask about team sizes, monster attributes, turn order rules, win conditions, and log format. Confirm whether abilities, status effects, or items are needed.
Define classes like Monster, Team, Battle, Turn, Action, and Logger. Assign responsibilities and relationships, focusing on encapsulation and extensibility.
Specify how turns are ordered (e.g., by speed), how actions are chosen and resolved, and how damage/effects are applied. Handle edge cases like simultaneous death.
Design a logger that records each event chronologically with sufficient detail. Ensure the final result (winner, survivors, rounds) is clearly reported.
Mention how to add new abilities or monster types via polymorphism. Describe unit tests for battle logic and trade-offs between simplicity and flexibility.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.