Lab 2: MineSweeper
CS 241: Data Structures, Fall 2007


Due Date: Monday, Sept 17

Goals for this assignment are to:

Reading

Read Chapter 2 before starting this assignment.

The Game

If you are not familiar with the game Minesweeper, you should play it a number of times to make sure you thoroughly understand the rules. Most computers have the game on them. Never begin designing or programming until you thoroughly understand the problem you are trying to solve.

An example of what is expected for this lab can be found on \\home\classes in the folder gorr\cs241Fa07\JarFiles. This version of MineSweeper is not fully implemented. You will complete the game in a later lab. You may choose to have an interface that is a little different from the example. However, be sure to include "set size", "debug" and level-of-difficulty capabilities.

Directions

  1. Before you begin programming, draw the UML class diagram for the game. We will begin this in class.

  2. Implement the Minesweeper game, except for the part where when you click in an empty cell, everything nearby that is empty is also turned over. We will come back to this in a later lab when we have talked about recursion.

  3. Suggestions:

  4. Extra Credit (20%, i.e. 2 pts - extra): Implement the program using a gui type interface (i.e. where the user gets to click on squares to take a turn. Don't do this unless you are confident that you can finish on time.

Evaluation

By class time on Monday September 17, you should have completed the following:

  1. Implemented the Minesweeper Program in a JFrame window.
  2. Written and generated the javadoc for the important methods and class variables.
  3. Generated a jar file.
  4. Zipped together the entire netbeans project and emailed to gorr. Include in the subject line the course number and the lab number, e.g. "cs241 Lab 2" otherwise you run the risk of the assignment getting lost in the instructor's overloaded email bin.

No later than Thursday, Sept 20 you should have demonstrated the Minesweeper Program to the instructor If you can'tdo this during lab time, then you need to arrange another time to meet with the instructor.


[top]  [Schedule]  [Home]