Java program to play minesweeper , JAVA Programming

Project Requirements

  1. Write and test a Java program to play Minesweeper using Model-View-Presenter design (The model is an interface defining the data to be displayed or otherwise acted upon in the user interface.
  2. The view is an interface that displays data (the model) and routes user commands (events) to the presenter to act upon that data.
  3. The presenter acts upon the model and the view. It retrieves data from repositories (the model), and formats it for display in the view.)

This project is divided into three tiers. You must complete one tier before beginning the next.

Tier 1
Implement the basic Minesweeper functionality:

1. Determine the neighbor count (i.e., for each cell, count the number of neighbors that are mines).

2. If the user selects a cell that is blank (i.e., no mines as neighbors) show all eight cells immediately surrounding the selected cell. If the selected cell is near an edge, be sure not go out of bounds.

3. If the user selects a cell that is non-blank (i.e., mines as neighbors), display only that cell number.

4. When all non-mine cells have been selected, display a JOptionPane message showing that the user has won.

5. When a mine cell is selected, show a JOptionPane message that indicates the user lost.

6. For this tier, your main method may hard-code the size of the board; but your GUI and your game engine should not make assumptions about the board size.

7. The game board should show the location of the mines. (This makes your project much easier to grade.)

Tier 2
Make the game more complete and give the user more options:

1. Allow the user to specify the number of mines and size of the board to be used. There are several ways you can do this.
o Use command-line parameters
o Create a new dialog window
o Use JOptionPane.showInputDialog
Be sure to perform bounds checking on the user input. The game should not crash if the user specifies a board size of "-6 x tomorrow".

2. Allow the user to flag cells. You may use any reasonable mechanism to flag cells.

3. Allow the user to show or hide the location of the mines. (In other words, give the game a "real game" mode and an "instructor demo" mode.)

Tier 3
Make the game fully operational:

1. If the selected cell is blank, show all blank cells connected to the current cell. (This task will be demonstrated in class and shown using the online Minesweeper games.)

2. Use the right mouse click to flag a cell. Suggestion: use a search engine with the following search words: Java right click.

Posted Date: 3/25/2013 3:57:55 AM | Location : United States







Related Discussions:- Java program to play minesweeper , Assignment Help, Ask Question on Java program to play minesweeper , Get Answer, Expert's Help, Java program to play minesweeper Discussions

Write discussion on Java program to play minesweeper
Your posts are moderated
Related Questions
Socket and ServerSocket. ServerSocket is used for normal two-way socket communication. Socket class permits us to read and write by the sockets. getInputStream() and getOutputStrea

A pointcut is something that describes at what joinpoints an advice should be applied. Advices can be applied at any joinpoint that is supported by the AOP framework. These Pointcu

The process of applying aspects to a target object to form a new proxy object is known as Weaving. The aspects are woven into the target object at the verified join points.

I need to code using java in netbeans for my dissertation which is in data mining domain...deals with privacy preserving of sensitive rules or items using association rule hiding

You must design, code and demonstrate a J2ME program (a program capable of running on mobile telephones) according to the specification given in the next section.  The overall cour

In the lectures, we have written programs for bond pricing in discrete time. We have also talked about the theory for bond pricing and yields in continuous time. In this exercise,

I can''t figure out how to do this question: "Given two linear equations: ax + by + c = 0 and dx + ey + f = 0" solve for x and y. A, b, c, d, e, and f being inputted from the user.

This program will help you start doing GUI programming, and is a good example of 2D arrays. Mine Sweeper is a classic game that is played on a 2D grid of cells. At the beginning of

My name is Myers, the project director of an online business that is scheduled to commence this summer in Nigeria. We are in the process of recruiting members to the project team a

What is a variable in Java program? It's a memory location. Memory location is given some name. Memory location is being assigned some value. Value may change o