COSC.497.001, Spring 2005
C++ For Game Developers
Yoram Chisik  

Assignment 5
Minesweeper


--- Class Links ---
Course Syllabus


The Exercise:

For your final assignment you will implement the game minesweeper. A version of the game can be found in any installation of Microsoft Windows. The best way to get acquainted with minesweeper is to play several round of the game so start playing.

Minesweeper consists of a 2-dimensional grid of squares. Each square is originally covered; under some squares there are mines (the mines are randomly distributed).

When you uncover a square with a mine under it, you lose.

When you uncover a square that doesn't have a mine under it, the game displays the number of mined squares adjacent to the current square(a number from 0 to 8). If this number is zero, the game must perform the uncover operation on all squares adjacent to it.

The game ends when you blow up or clear the entire board.

You will implement minesweeper with a text only interface, i.e. a console application like the ones we have developed this semester. The application must be developed using classes. The basic implementation requires that you develop a version of the game in which the player can choose between 3 different levels, beginner, intermediate and hard. The levels are differentiated by the size of the grid and the number of mines. The player should be able to uncover squares by specifying their position until he/she either clears the board or blows up, which ever occurs first.

During play the player should be able to specify a position to uncover, restart the game, or quit the game.

You may add additional features such as:

  • Allowing the player to mark a certain position as containing a mine.
  • keep a score
  • add a timer or play against the clock
  • Maintain a top score list
  • add your own elaborations to the game

    Do not start to think about additional features until you have developed the basic implementation of the game

    Deliverables

    A design document detailing your design of the game. The design document should NOT be a one page rehash of the assignment specification but a detailed design plan of your game outlining the following elements:

    • Outline of the game and gameplay.
    • Interface design and how the player will interact with the game
    • A step by step description of how your game will work. How the player will be prompted for input, what input will be recieved by the system, when a cell is uncovered what will the game engine do, what data structures are you using, what is the sequence of events, elaborate in great detail every step and every action taken by your application.
    • class structure, the classes you will use and their constituent elements

    Submission Guidelines

    • All work must be uploaded to the ftp server. NO e-mail submissions.
    • Make sure ALL files were properly uploaded
    • All files MUST be placed in a folder called assignment5 inside a C++ or COSC499 folder in your ftp directory. I will NOT look for files.
    • This is the final assignment, NO late submissions will be accepted. There will be no exceptions.
    • The C++ file(s) submitted MUST compile on the Dev-C++ compiler, i.e. the one enclosed with the book and installed in the lab. You are free to use any development environment you wish but you must make sure your application will compile on the Dev-C++ IDE. NO attempt to fix non compiling code will be made.
    • code should be well formatted, i.e. using white space, tabs and parentheses to make the code easy for the eye to see and read.
    • code should be well commented, its not enough for your application to work, I want to see your thought processes.
    • Your design document and comments will account for 30 points of your grade so don't be skimpy

    Due date

    • All files should be loaded to your folder on student-iat.ubalt.edu by 2:00PM EDT on 05/11/05.

Updated 4/19/05