This question evaluates object-oriented design skills with emphasis on probabilistic modeling, deterministic versus random initialization, clear class responsibilities, state management, and testability within a Minesweeper-like system.
Design an object-oriented Minesweeper game. The board is a grid of cells. On initialization, each cell is given a probability prob that it contains a mine. The system should use these probabilities to generate the mine layout and initialize cell states deterministically when needed (for testing) and randomly otherwise.
Assume prob can be provided as either:
Login required