Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

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.

Java, Programming

  • Category:- Java
  • Reference No.:- M9531863

Have any Question?


Related Questions in Java

Retail price calculatorwrite a java program that asks the

Retail Price Calculator Write a JAVA program that asks the user to enter an item's wholesale cost and its markup percentage. It should then display the item's retail price. For example: (If an item's wholesale cost is 5. ...

Applied software engineering assignment 1 -learning

Applied Software Engineering Assignment 1 - Learning outcomes - 1. Understand the notion of software engineering and why it is important. 2. Analyse the risk factors associated with phases of the software development lif ...

Part a specification - robot simulationpart a

PART A Specification - Robot Simulation PART A Requirements To complete this assignment you will use the supplied eclipse project Robot P1/. It is already set up to execute a simple arm movement loop which you will build ...

Assessment database and multithread programmingtasktask 1

Assessment: Database and Multithread Programming Task Task 1: Grade Processing University grading system maintains a database called "GradeProcessing" that contains number of tables to store, retrieve and manipulate stud ...

In ruby the hash class inherits from enumerable suggesting

In Ruby, the Hash class inherits from Enumerable, suggesting to a programmer that Hashes are collections. In Java, however, the Map classes are not part of the JCF (Java Collections Framework). For each language, provide ...

Assignment - java program using array of objectsobjectives

Assignment - JAVA Program using array of objects Objectives - This assessment item relates to the course learning outcomes as stated in the Unit Profile. Details - For this assignment, you are required to develop a Menu ...

Can someone please help me with the following java

can someone please help me with the following java question The input is an N by N matrix of nonnegative integers. Each individual row is a decreasing sequence from left to right. Each individual column is a decreasing s ...

Fundamentals of operating systems and java

Fundamentals of Operating Systems and Java Programming Purpose of the assessment (with ULO Mapping) This assignment assesses the following Unit Learning Outcomes; students should be able to demonstrate their achievements ...

Solving 2nd degree equationsbull write the following java

Solving 2nd degree equations • Write the following Java methods • boolean real-sols(double a, double b, double c): it returns true if the 2nd degree equation ax2 + bx + c has real solutions • double solution1(double a, d ...

Assignment taskwrite a java console application that allows

Assignment task Write a java console application that allows the user to read, validate, store, display, sort and search data such as flight departure city (String), flight number (integer), flight distance (integer), fl ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As