Return to the Section 101 Homepage.


MineSweeper GUI

Interaction

* PlayMinesGui takes the same command line arguments as PlayMines. Run > java PlayMinesGui -h for details.
* The output of your methods toStringBoard(), and optionally toStringMines() and toStringTiles() will still be printed to stdout (as with PlayMines).
* Left click to open a tile, right click to flag a tile, and ctrl-right click to unflag a tile. Click outside of the grid boundary to test invalid indices.
* Closed tiles are black, open tiles are white, flags are blue, bombs are red.

Requirements

1. Make the getMines() and getTiles() methods in MineSweeper.java public. This will eventually be required for us to grade the project, so you might as well change it now.
2. Save PlayMinesGui.java to the same directory as MineSweeper.java and PlayMines.java.
3. Compile and run PlayMinesGui.

Notes

This GUI should serve as only part of your testing scheme. It is provided to make interacting with the game less cumbersome.

While testing, replacing the placeMines() method will allow you to introduce determinism. That is, you can set up specific cases to test and try them repeatedly.

Please report any bugs you find. Good luck!



Return to the Section 101 Homepage.