260Fall06Ass2 - CMPS260 Fall 2006 Assignment #2 DUE DATES:...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CMPS260 Fall 2006 Assignment #2 DUE DATES: Submission Sunday Sept. 24 th @10:00 pm. Folder In class Tuesday Sept. 26 th . We are going to write a program that plays a crude game of minesweeper. The board is 3 X 3 and the user gets to specify how many mines there will be. At the start of the game, the mines are distributed randomly in the cells and the cells are all covered. If a cell doesn’t contain a mine, it contains the number of adjacent cells that do contain mines. The game ends when you have either: Flagged all the mines and uncovered all the other cells (you win). or You uncover a cell that contains a mine (you lose). INPUT: The input to the program will be from the keyboard. The program will provide the user with the following options: At startup, enter the number of mines. There must be at least one mine and there can’t be more mines than cells. uncover a cell. If it is a mine, you lose. If it doesn’t contain a mine, you know how many cells adjacent to it do contain mines. This requires the user to input a row and column. flag a cell as being a mine. This means you think there is a mine there. This requires the user to input a row and column. unflag a cell. This means you have changed your mind.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

260Fall06Ass2 - CMPS260 Fall 2006 Assignment #2 DUE DATES:...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online