Nash AI·Software Engineer·Technical Phone Screen
- Implement a Minesweeper game class that takes width, height, and number of mines as constructor arguments. It should randomly place mines on initialization, support a click(x, y) method that loses the game on a mine, reveals a numbered cell directly, or flood-fills all connected zero cells and their neighboring numbered cells if the clicked cell has no adjacent mines. Include a console-based visualization so someone can actually play it.
“The flood-fill part is where I spent most of my time.”