Design OOD for probabilistic Minesweeper
Company: Nash AI
Role: Software Engineer
Category: System Design
Difficulty: medium
Interview Round: Technical Screen
Design an object-oriented Minesweeper game. The board is a grid of cells. During initialization, each cell is passed a parameter prob indicating the probability that the cell is a mine; explain how these per-cell probabilities are used to generate the initial mine layout and initialize cell states. Define the core classes (e.g., Game, Board, Cell) and their responsibilities, the relationships among them, and the public APIs to
(a) print the current board state and
(b) process a user click. Specify expected state transitions for a click at a high level (lose on mine, otherwise reveal logic handled by algorithms), handling of invalid or duplicate clicks, and how the design supports maintainability and testing.
Quick Answer: Design OOD for probabilistic Minesweeper evaluates requirements, scale assumptions, API/data design, architecture, trade-offs, failure modes, and rollout in a realistic interview setting. A strong answer states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.