![rules of minesweeper game rules of minesweeper game](https://img.olhardigital.com.br/uploads/acervo_imagens/2019/05/20190502110751.jpg)
As you gain XP, you will improve your rank, and unlock various powerups. PowerupsĪs you complete grids, you will gain XP. From there, you should be able to clear the majority of squares surrounding the mine, especially if there are lots of 1s and 2s nearby. Corners of squares are easiest to spot squares with mines under, so I would recommend starting at these. I would recommend trying both methods.Īs you play, you will learn combinations. Some people like to place this square in the centre of the grid, but I personally liked to place it near a corner, so I could work around the outside of the grid. As such, it is always a good idea to place this somewhere strategic. The first square you dig is ALWAYS mine-free. Make sure you are 100% sure that there is a mine in the position before placing a flag, otherwise it may confuse you later and potentially cause a Game Over. Note that just because you have placed a flag, it does not necessarily mean it is in the correct position. Using the numbers on mine-free squares, the Flag tool, and of course your superior human intellect, you can work your way through the grid bit by bit.Īs there is a defined number of mines, each time you place a flag, the number of 'undiscovered' mines is still shown above the grid. If the square shows 1, there is a single mine adjacent, 2 and there is 2 mines adjacent, and so on. If you click a square with no mines adjacent, all adjacent empty squares will also be revealed, showing all squares with at least one mine adjacent.
RULES OF MINESWEEPER GAME FREE
If there is no number, the surrounding squares are also free of mines. Modded (again) by Sobriquet and re-licenced as GPL v1.Each uncovered mine-free square will show you how many mines are directly adjacent. Modded by Sobriquet and re-licenced as CeCILL v2 Gui clone w/o graphic files but with cheats. ( "Solution: (+ = correctly marked, - = incorrectly marked)" ) Mark (Item => The_Grid, X => Chosen_X, Y => Chosen_Y ) While not Finished and Count_Marks (The_Grid ) /= Bomb_Count loop Height ) īomb_Count : Positive := Width * Height * 20 / 100 Procedure Set_Bombs (Item : in out Grid Max_X, Max_Y, Count : Positive ) is Opened andĬlear_Neighbours (The_X + 1, The_Y - 1 ) Opened andĬlear_Neighbours (The_X - 1, The_Y - 1 ) If Mines_Nearby (Item, The_X, The_Y ) = 0 then only proceed if neighbours don't have mines Procedure Clear_Neighbours (The_X, The_Y : Positive ) is clears the neighbours, if they don't have mines clears a field and it's neighbours, if they don't have mines Procedure Mark (Item : in out Grid X, Y : in Positive ) is counts how many mines are in the surrounding fieldsįunction Mines_Nearby (Item : Grid X, Y : Positive ) return Natural is Type Grid is array (Positive range, Positive range ) of Field Note: Changes may be made to the method of clearing mines to more closely follow a particular implementation of the game so long as such differences and the implementation that they more accurately follow are described.Īda with Ada. You may also omit all GUI parts of the task and work using text input and output. The Task is to create a program that allows you to play minesweeper on a 6 by 4 grid, and that assumes all user input is formatted correctly and so checking inputs for correct form may be omitted. You win when you have correctly identified all mines.Of course you lose if you try to clear space that has a hidden mine.Other free points show as an integer count of the number of adjacent true mines in its immediate neighborhood, or as a single space ' ' if the free point is not adjacent to any true mines.If the point is free space then it is cleared, as are any adjacent points that are also free space- this is repeated recursively for subsequent adjacent free points unless that point is marked as a mine or is a mine.You can mark what you think is free space by entering its coordinates.You may mark what you think is the position of a mine which will show as a '?'.You are initially shown all grids as obscured, by a single dot '.'.The grid is shown as a rectangle of characters between moves.Each mine occupies a single grid point, and its position is initially unknown to the player.The total number of mines to be found is shown at the beginning of the game.The top left of the grid is position 1,1 the bottom right is at n,m. Positions in the grid are modified by entering their coordinates where the first coordinate is horizontal in the grid and the second vertical. There is an n by m grid that has a random number (between 10% to 20% of the total number of tiles, though older implementations may use 20%.60% instead) of randomly placed mines that need to be found. You are encouraged to solve this task according to the task description, using any language you may know.