Program 1: MineSweeper
Due Date
This assignment is due at the beginning of
your lab period on Thursday, February 5th.
Partners
You may work with at most one other person on
this assignment. Your partner must be in the
same lab section as yourself.
Please review the class collaboration policy
(available off of the main CS 221 page) so that
you know what is and what isn't allowed.
Purpose
The purpose of this program is two-fold. First, it is
to help you refresh your Java programming skills after a
month away from the language. Second, it is to give
you practice modifying and building upon someone else's code.
Assignment
Take the modified MineSweeper program that you
built in lab on Thursday, January 22nd (if you
didn't complete that lab assignment, complete it
now before beginning) and add to
it the following functionality:
- Modify the makeGuess method so that if a
square with 0 surrounding mines is guessed, the
guess ripples outward until squares with more
than 0 surrounding mines are encountered.
- Modify the makeGuess method so that the
user can place (or remove) question marks to indicate
the possible presence of a mine. If you aren't
familiar with MineSweeper, you should find a Windows
machine and play the game to understand what this
means.
- Allow the user to select one of three versions
of MineSweeper to play. Beginner means a 5 by 5 board
with 3 mines. Intermediate means an 8 by 8 board with
8 mines. Advanced means a 10 by 10 board with 15
mines.
- Add appropriate comments (use Javadoc where relevant)
to the entire solution.
- Choose an enhancement and add it. Place a comment at the
top of the Driver.java file that explains what enhancement
you have added.
What to Submit
- A disk with your code on it. This is important
as your program will be tested in lab on Thursday,
February 5th.
- A printout of the source code that you write.
- A printout of your program running twice. First, show
it running on a beginner board where the user
wins and flags are placed and removed during the game.
Second, show it running on an intermediate
board where the user loses. Also, demonstrate the
enhancement that you chose in this run.
Grading
- 50% Correctness
- 10% Good Design
- 10% Good Code
- 10% Appropriate Comments including Javadoc Comments
- 10% Handing in the Required Materials
- 10% Readable Output