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

Info icon This 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.
Image of page 1

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

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern