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.
Comments (123)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Level 0
24 July, 10:15
Amy Booth
Level 4 , York, United States
7 July, 01:43
Is there a way to go back to a previous step? ie. I was on step 3, but had to reset my progress to see the directions for step 2 again.
Amy Booth
Level 4 , York, United States
7 July, 01:50
I answered my own question - games are also a task, so you can navigate to closed/completed tasks
Justin Smith
Level 13 , Greenfield, USA, United States
4 July, 21:01
I have started this project in IDEA. I think I have done things correctly according to part 1 of this, but when I run it it says "Error: JavaFX runtime components are missing" I am on IDEA Community Build 2021.1.3, JDK 16. Windows 10 64x.
5 July, 18:16
You're missing the javaFX library, it is no longer builtin in the jdk, import them manually: you should find a solution here
Level 0
1 July, 18:32
Level 0
1 July, 17:39
GüdonderGüterzug idiot at diode
1 July, 10:41
Level 0 , Poznan
29 June, 09:24
Calis-Rita Moses
Level 0 , Ridgewood
11 June, 11:15
This game no work
Level 41 , Solar System
11 June, 19:48
Please submit a question in the Help section, if your code does not pass verification.
Level 24 , Wittenberg, Germany
27 May, 15:32
FWIW, onMouseLeftClick(int, int) is public and void.
Aaron Baer
Level 1 , Durham, United States
19 May, 18:04
lmao it went from displaying numbers to developing a game instantly, im sorry but wtf did i miss?