At the same time, it is a fun and challenging logic puzzle Minesweeper free puzzle trains your brain and increases your mind power. Speed performance has been improved on easy and normal difficulties.Īdding rules to apply when have to randomly click is needed.The minesweeper classic for android has been tagged as the best version of the classic mines game, and it gets even better! The scores are obtained from their pixels color. On v1.2, opencv2 template matching is no longer used. On v1.0 performance depends on speed parameter that set the time the script will wait after clicking a cell to take a new screenshot. If the game is lost when clicking a random cell, if score window is recognized, the script will stop too.
Once there is no more flags left, the game is beated and the script stops. If none of the cells are valid for any action, a random unknown cell will be clicked. If the number of flagged adjacent cells is equal to the score and the number of unknown adjacent cells is higher than 0, then click on any of them. If the number of flagged adjacent cells is less than the score of the checked cell and the number of unknown adjacent cells plus flagged cells is less than the score, then place a flag on any of the unknown adjacent cells. Next, each cell is checked for placing a flag on any of their adjacent cells.
On each move a screenshot is taken and each cell that is not green is recognized (not-unknown cell). Important: If you need to abort the execution of the script, place the mouse on top-left corner of your screen. Note: The first time you run the script will open a new windows that might be placed over game window, just move out and resize it. Open google minesweeper game and make sure the game window is completely visible, then click on python IDLE and press F5. Once the installation is complete, right click on minesweeper.py file and edit it with IDLE. Pip install pyautogui opencv-python numpy