Kaboom Test Plan

The main method must be in a class named KaboomConsole or KaboomGUI (as appropriate). The public interface must be as provided in the skeleton.

Start the application.  The board number should appear in the title bar.  All cells are initially hidden.   For the GUI version, verify that the GUI looks like the image in the requirements.  Background and piece images are different than instructors.

Start the app several times and verify the game begins with a different randomly selected board each time.

Selecting Game > Restart should begin the same board over again.

Select Game > New Game to begin the next sequential board.

The Game > Select Game menu should open a dialog that allows the user to enter a desired game number.  The application should ignore input outside the range 1 - 5000. 

Select Game > Scores to open a dialog showing all the saved winning times as depicted in requirements, ordered from fastest to slowest.   Duplicate times are sorted by name.

The console version has an unpublished menu item, "0", which deletes the hall of fame file. 

The Game > Peak menu should reveal all the cells on the board, but NOT cause you to win the game.

The Game > Cheat function clears the board except for two cells as described in the spec.

All menus should have keyboard accelerators.

At the start of the game the grid is completely filled with hidden squares. 

A status label shows the number of Moves, the number of Flagged squares, the number of bombs, and time elapsed in minutes and seconds. The Moves count is zero and the Flags count is zero. 
Sample:

"Moves: 2   Flags:   0/8"
"Moves: 2 Flags: 12/8"
"Moves: 15 Flags: 7/8"

When you click on a square which doesn't have a bomb, numbers in squares next to unrevealed squares will indicate how many bombs are adjacent to it. For example, if an empty square has a 2 in it, there are 2 bombs adjacent to it.

When you click on an empty square that has no bombs next to it, the app recursively reveals all the other adjacent empty cells, until it gets to one that is numbered.

If you click on a square containing a bomb, all the squares are revealed showing images of exploded and unexploded bombs as depicted in the requirements.  A lose dialog message appears. Verify that there are as many bombs as shown in the status label.  Verify that the bomb that was clicked on is shown as exploded.

A right mouse button click will toggle a "flag" image on and off to allow the player to mark squares that are suspected bombs. Move counter should NOT increase when a cell is flagged or unflagged.

You don't win for flagging all the bombs. You only win when you clear all the non-bomb cells.

If the player wins the game a popup dialog should show the elapsed time and ask the player if they want to record their time.  If the player clicks "Yes", a second dialog allows the player to enter their name. Note: the dialog should appear AFTER revealing the board. 

Names longer than 20 characters should be truncated to 20 characters.

Clicking a non-bomb cell after the game is won or lost will increment the move counter, but not win a second time.

Verify the number of flags increments as you mark squares.
Verify the number of flags decrements as you unmark squares.

Flagged cells should be cleared just like unflagged cells by the recursive reveal operation.

Preferences displays a dialog from the preferences.ini file.   Verify the game restarts when the dialog is closed using the specified options.   

Preferences displays categories from preferences.ini in order they appear in the .ini file. Category may have 1-n options.

Create a preferences.ini file with categories in scrambled order, and be sure they appear in the dialog in the order they appear in the .ini file.

Verify all corners of the board can be selected in both console and gui versions, for small, medium, and large boards.

Sample Data

Here's an easy to solve board:  Board 7 (size 8) can be won in 3 moves:
A8
H1
H8