Application for minesweeper, JAVA Programming

Assignment Help:

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 the game, all of the cells are "covered", and some of them have mines in them. The goal of the player is to uncover all of the cells that are not mines without detonating a mine. This happens when the player tries to uncover a cell with a mine in it.

Instructions:

1. Write GUI application that plays the game of mine sweeper. One way to do this would be to have the main application extend JFrame. The cells of the mine field could then be JButtons in a Grid layout.

2. A cell should exist in two states, covered and uncovered. In the "covered" state, the cell is blank. In the "uncovered" state, a "mine" cell shows an asterisk (*), or a picture of a mine. An uncovered "clear" cell displays the number of neighbor cells that are mines (or is blank if there are no neighboring mines).

3. Left clicking on a covered cell uncovers it.

4. Right clicking on a covered cell toggles a flag indicating that the user thinks there is a mine in that location.

5. When the user uncovers a clear cell that has no neighboring mines, all of it's neighbors are also uncovered. If any of the neighbors have no neighboring mines, their neighbors are uncovered as well, and so on.

6. If the user tries to uncover a mine cell, the mine explodes, and the player loses the game.

7. Optional: Use images to indicate mines, and flags. Make some kind of explosion special effect. Allow the user to restart the game after winning or losing. Allow the user to specify the size of the minefield, and the number of mines in it.

Assignment checklist:

  • Write a mine sweeper program.
  • Make sure the program compiles and runs from the command line without modification.
  • Include your source, executable files and report in your turnin.
  • Zip all of your files in a SINGLE .zip file and turn it in to the D2L dropbox.

Related Discussions:- Application for minesweeper

Area under the curve, Write a program to find the area under the curve y = ...

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

Explain data entry issues, Explain data entry issues? DATA ENTRY: The...

Explain data entry issues? DATA ENTRY: There is new data entered every day. New customers are added every day. Some of the data entry needs the manual entry within computer s

Luminous Jewels - The Polishing Game, Byteland county is very famous for lu...

Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec

Explain the three benefits of access protection, Explain the Three Benefits...

Explain the Three Benefits of Access Protection ? Access protection has three major benefits: 1. It permits you to enforce constraints on an object's state. 2. It gives a si

I need ps1 emulator for android, I need PS1 emulator for android Project...

I need PS1 emulator for android Project Description: There is an open source app called psx4droid i need a developer to solve problems and bugs and doing performance improvem

Write an application for a video store, Do you provides a Complete source C...

Do you provides a Complete source Codes for this application: " a. Write an application for a video store. Place the names of 10 of your favorite movies in a combo box. Let the use

Basic java, Why is Java platform independent / architecturally neutral / po...

Why is Java platform independent / architecturally neutral / portable?

Benefits of aop (aspect oriented programming), Benefits of AOP (Aspect Orie...

Benefits of AOP (Aspect Oriented programming) OOP can give the system level code like transaction management, logging, security etc to scatter throughout the business logic. A

Illustrate java management extensions (jmx)?, JMX framework can enhance the...

JMX framework can enhance the manageability of your application by  1. Monitoring your application for critical events, performance problems, and error condition statistics. E.g

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd