Mine Picker

Recommended levellevel
About 10 years ago, an omen appeared in offices everywhere: if an employee is staring too intently at his screen and occasionally clicks with the mouse with the same intensity, he's most likely playing Minesweeper. For anyone who has forgotten, and for others who missed this era due to their age: Minesweeper is one of the most popular office games that shipped with Microsoft Windows. Even today, if you're sitting at a computer running this operating system, Minesweeper is either pre-installed (just type "Minesweeper" in the Windows search box) or you can download it free from the Microsoft Store. Many Linux builds, such as KDE and GNOME, also acquired similar games. Unlike most other "time killers", this game presents the perfect balances of logical moves and random moves, making Minesweeper very exciting and simultaneously... somewhat less pointless than other such games. So, we have a game board divided into squares. Some of them contain "mines", but we don't know how many there are or where they are. Our goal is to reveal all of the unmined squares without getting blown up. You reveal a square with a left click. If it doesn't contain a mine, then a number appears that represents the number of mines adjacent to the revealed space. Now you need to do some thinking and guess which cells can be revealed and which should be marked as mined. And so it continues until you win or explode. Windows developers created this toy to help humans learn to use the mouse (yes, there was a time when computers didn't have mice and you had to be content with just the keyboard). Actually, the history of Minesweeper stretches farther back than even Microsoft. Its predecessors were available on mainframes as early as the sixties of the last century… But we digress... Right now, we're talking about creating our own version of Minesweeper! The rules for our "probabilistic brainteaser" will be exactly those described above. We've already divided this difficult task into subtasks on CodeGym and we'll tell you what to do. Be brave.
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Agent SmithLevel 25 , Riga
11 September, 13:30
Nice and easy mini-project to reinforce your lvl 5-10 skills. 👍
Monster 821Level 8 , Heilbronn
27 August, 18:40
which level shoud I have, to create the Minepicker game?
RichLevel 13 , San Diego
30 August, 06:18
tough question really. it depends on how well you are grasping the concept behind classes, loops, conditional statements and how they all play off each other. with a little research and a lot of patience you should be able to give it a go.
Xiaosong WenLevel 4 , Bennington
9 August, 16:30
this is my restart funcuin: private void restart(){ this.isGameStopped = false; this.countClosedTiles = SIDE * SIDE; this.score = 0; this.countMinesOnField = 0; setScore(0); createGame(); } And CODEGYM keeps telling me: The restart() method must assign false to the isGameStopped field. What's wrong with this stupid verification?
VelociraptorLevel 3 , Bangalore
22 July, 08:00
this is correct right??
Sam KLevel 0 , Brincliffe
8 July, 10:26
this thing doesnt work: class, interface, or enum expected. file com/codegym/games/minesweeper/part01/MinesweeperGame.java, line 7, position 130 anyone HeLp
Sam KLevel 0 , Brincliffe
8 July, 10:28
Here's my code:
package com.codegym.games.minesweeper;
import com.codegym.engine.cell.*;

public class MinesweeperGame extends Game {

}import com.
Angel LiLevel 18 , Fremont
26 July, 02:41
Why do you have that random import statement in the middle of nowhere?
import com. // can't be here, delete it
nicLevel 0
24 June, 21:42
MinesweeperGame class inherit the Game class. Help tf does this mean, English is not my first language
Angel LiLevel 18 , Fremont
3 July, 20:02
public class MinesweeperGame extends Game {
The 'extends' means it's a child class of the class game.
Brad ReedLevel 19 , Hartford
17 June, 06:34
Fun tip, don’t try this on an ipad...it will infuriate you...my new pc needs to get here fast haha
DanielLevel 1 , Newark
3 June, 01:31
how do you write the program?
lyx3030Level 10 , Guangzhou
27 May, 12:40
LiewLevel 10
11 May, 08:00
how to we go back to the previous stage? Didnt really read the instructions carefully.