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
Pack MtdLevel 1 , Urbana
Wednesday, 03:59
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
Facundo VillarroelLevel 19 , Berlin
9 January, 02:33
Everytime I verify a part of the game and go to the next one I get a dialog saying that the files for the minesweeper task will be updated, so my code is reset and the default code lets say it's displayed. How can I fix this?
Ava JamesLevel 2 , Plano
8 January, 21:27
how do i start?
ReginaLevel 41 , Florida
9 January, 15:04
The section is recommended for solving after completing 5+ levels.
30 December 2019, 14:35
¿can i get the source code for Game class and other game engines
Adnan RazzaqLevel 15 , Bamberg
23 September 2019, 22:14
can we import them to intellij?
Teodor OpreanLevel 4 , Timisoara
29 November 2019, 17:37
Yes, see this link: https://www.youtube.com/watch?v=NZSNHI883ak
赖卓成Level 0
9 September 2019, 08:25
nullLevel 0
24 September 2019, 06:52
AilinLevel 3 , Saint Louis
23 January, 08:21
No! 沒有! 没有!
masz3kLevel 16 , Lodz
18 August 2019, 11:21
I feel like we should program these games from scratch not using codegym engine - we still know nothing about building frames and windows and it's hidden from us, which is most important thing while making games or software in my opinion. I hope that changes on higher stages of games...