Mine Picker

Recommended levellevel
5+
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(68)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
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 14 , Fremont
day before yesterday, 20:02
public class MinesweeperGame extends Game {
The 'extends' means it's a child class of the class game.
Brad ReedLevel 8 , 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
showMessageDialog(背景色,显示文字,文字颜色,文字大小);
LiewLevel 10
11 May, 08:00
how to we go back to the previous stage? Didnt really read the instructions carefully.
MilanLevel 0
15 April, 09:39
Hello im new
Bryce LindleyLevel 8 , Olympia
20 April, 03:44
Hi welcome!
AilinLevel 3 , Saint Louis
5 June, 14:49
Hi !
Pack MtdLevel 1 , Urbana
1 April, 03:59
Packiey
VimalLevel 3
28 February, 05:10
Why are we using
gameField[y][x] = new GameObject(x, y);
instead of
gameField[x][y] = new GameObject(x, y);
in Step 4
LucilleLevel 0
27 February, 18:41
it dont work
VimalLevel 3
28 February, 05:30
Please be a little specific
Jacek OLevel 2
7 February, 17:47
What does this mean? "When the a cell be revealed?"
VimalLevel 3
28 February, 10:37
I think this is a typo
AilinLevel 3 , Saint Louis
13 March, 13:27
When the cell is revealed