Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

50-MinesweeperGame

"Minesweeper Game" was designed as the 50th and final program in basic Java.

Game rules :

The game is text based.

It should be played on two-dimensional arrays and designed within the MineSweeper class.

The size of the matrix, that is, the number of rows and columns, should be determined by the user.

A quarter of the number of elements in the array (number of elements / 4) random mine should be placed. For example, if the array is 4x3 in size, the number of elements should be calculated with the formula (Number of Rows * Number of Columns) and its size should be 12. In this case, the number of mines should be 12 / 4 = 3 pieces.

The user must select a point on the matrix. For point selection, row and column values ​​must be entered.

If there is a mine at the point where the user enters, he must lose the game.

If there are no mines, all positions that touch the relevant point should be looked at (right, left, up, down, upper left diagonal, upper right diagonal, lower right diagonal, lower left diagonal) and the sum of the number of mines around should be written on the relevant point. If there is no mine touching the point, the value "0" should be assigned.

If the user can select all the points without pressing any mines, he should win the game.

Screenshot_5-horz

cats

Screenshot_10-vert