# CircuitPython Minesweeper Game

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/079/252/medium800thumb/gaming_thumb.jpg?1565377721)

According to [www.freeminesweeper.org](http://www.freeminesweeper.org) (whose game is shown in the guide cover image)

> [Minesweeper](http://www.freeminesweeper.org) is a favourite of office and late night shift workers worldwide.

It's addictive, requires you to think, and every click/tap is fraught with tension. In short, an ideal time waster. In fact, one might think that minesweeper and solitaire were the primary motivation behind Microsoft developing Windows.

![](https://cdn-learn.adafruit.com/assets/assets/000/079/218/medium800/gaming_640px-Minefield_warning.jpg?1565276370 From Wikipedia CC BY-SA 3.0)

In this guide is a (slightly simplified) implementation of the classic Minesweeper game for the PyPortal and its touchscreen.

Because of the small 16x16 pixel game board squares, a stylus is recommended. One such as that used with a Nintendo DS type system will work fine.

### Adafruit PyPortal - CircuitPython Powered Internet Display

[Adafruit PyPortal - CircuitPython Powered Internet Display](https://www.adafruit.com/product/4116)
 **PyPortal** , our easy-to-use IoT device that allows you to create all the things for the “Internet of Things” in minutes. Make custom touch screen interface GUIs, all open-source, and Python-powered using&nbsp;tinyJSON / APIs to get news, stock, weather, cat photos,...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4116)
[Related Guides to the Product](https://learn.adafruit.com/products/4116/guides)
![Front view of a Adafruit PyPortal - CircuitPython Powered Internet Display with a pyportal logo image on the display. ](https://cdn-shop.adafruit.com/640x480/4116-00.jpeg)

- [Next Page](https://learn.adafruit.com/circuitpython-pyportal-minesweeper-game/setting-up-circuitpython.md)

## Featured Products

### Adafruit PyPortal - CircuitPython Powered Internet Display

[Adafruit PyPortal - CircuitPython Powered Internet Display](https://www.adafruit.com/product/4116)
 **PyPortal** , our easy-to-use IoT device that allows you to create all the things for the “Internet of Things” in minutes. Make custom touch screen interface GUIs, all open-source, and Python-powered using&nbsp;tinyJSON / APIs to get news, stock, weather, cat photos,...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4116)
[Related Guides to the Product](https://learn.adafruit.com/products/4116/guides)
### Pink and Purple Braided USB A to Micro B Cable - 2 meter long

[Pink and Purple Braided USB A to Micro B Cable - 2 meter long](https://www.adafruit.com/product/4148)
This cable is&nbsp;super-fashionable&nbsp;with a woven pink and purple Blinka-like pattern!

First let's talk about the cover and over-molding. We got these in custom colors, and if you&nbsp;_have_&nbsp;to have visible cables, then you might as well have the nicest fabric-bound...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/4148)
[Related Guides to the Product](https://learn.adafruit.com/products/4148/guides)
### PyPortal Starter Kit

[PyPortal Starter Kit](https://www.adafruit.com/product/4303)
# Copy change

&nbsp;

Why not trick out your fresh new board with some&nbsp;accessories? The Pi 2 is a big deal - a big, big deal. &nbsp;It has an upgraded ARMv7 multicore procssor and a full Gigabyte of RAM - meaning you're going to see ~2x the performance on processor-upgrade...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/4303)
[Related Guides to the Product](https://learn.adafruit.com/products/4303/guides)

## Related Guides

- [Adafruit PyPortal - IoT for CircuitPython](https://learn.adafruit.com/adafruit-pyportal.md)
- [PyPortal IoT Plant Monitor with AWS IoT and CircuitPython](https://learn.adafruit.com/pyportal-iot-plant-monitor-with-aws-iot-and-circuitpython.md)
- [MQTT in CircuitPython](https://learn.adafruit.com/mqtt-in-circuitpython.md)
- [PyPortal Adafruit Quote Book](https://learn.adafruit.com/pyportal-adafruit-quote-board.md)
- [Using Dashblock to Create Custom APIs for PyPortal](https://learn.adafruit.com/using-dashblock-to-create-custom-apis-for-pyportal.md)
- [PyPortal Roku Remote](https://learn.adafruit.com/pyportal-roku-remote.md)
- [Welcome to CircuitPython!](https://learn.adafruit.com/welcome-to-circuitpython.md)
- [TFT Spirit Board](https://learn.adafruit.com/tft-spirit-board.md)
- [Daily UV Index PyPortal Display](https://learn.adafruit.com/pyportal-uv-index.md)
- [Playing Animated GIF Files in CircuitPython](https://learn.adafruit.com/using-animated-gif-files-in-circuitpython.md)
- [PyPortal View Master](https://learn.adafruit.com/pyportal-view-master.md)
- [PyPortal Twitter Follows Trophy](https://learn.adafruit.com/pyportal-twitter-follows-trophy.md)
- [AdaBox 011](https://learn.adafruit.com/adabox011.md)
- [A Floppy Thumb Drive with a Color File Icon Display](https://learn.adafruit.com/a-floppy-thumb-drive-with-a-color-file-icon-display.md)
- [Upgrading AirLift ESP32 Firmware](https://learn.adafruit.com/upgrading-esp32-firmware.md)
- [PyPortal Guitar Tuner](https://learn.adafruit.com/pyportal-guitar-tuner.md)
