██▓     █    ██  ██ ▄█▀ ███▄ ▄███▓     ▓█████▄ ▓█████ ██▒   █▓
▓██▒     ██  ▓██▒ ██▄█▒ ▓██▒▀█▀ ██▒     ▒██▀ ██▌▓█   ▀▓██░   █▒
▒██░    ▓██  ▒██░▓███▄░ ▓██    ▓██░     ░██   █▌▒███   ▓██  █▒░
▒██░    ▓▓█  ░██░▓██ █▄ ▒██    ▒██      ░▓█▄   ▌▒▓█  ▄  ▒██ █░░
░██████▒▒▒█████▓ ▒██▒ █▄▒██▒   ░██▒ ██▓ ░▒████▓ ░▒████▒  ▒▀█░  
░ ▒░▓  ░░▒▓▒ ▒ ▒ ▒ ▒▒ ▓▒░ ▒░   ░  ░ ▒▓▒  ▒▒▓  ▒ ░░ ▒░ ░  ░ ▐░  
░ ░ ▒  ░░░▒░ ░ ░ ░ ░▒ ▒░░  ░      ░ ░▒   ░ ▒  ▒  ░ ░  ░  ░ ░░  
  ░ ░    ░░░ ░ ░ ░ ░░ ░ ░      ░    ░    ░ ░  ░    ░       ░░  
    ░  ░   ░     ░  ░          ░     ░     ░       ░  ░     ░  
                                     ░   ░                 ░   

Pynesweeper Minesweeper clone in Python with PyQt5

2019-10-07

Screenshot of my Minesweeper clone running on macOS, written in Python

In university, I wrote a clone of Minesweeper in Python using PyQt5. Its backing data structure was a graph, which allowed me to also add a hexagon mode.

It features:

  • Standard Minesweeper game elements; timer, score, smiley face, flagging, bombs
  • Various game difficulties
  • Persisting game state
  • Hi-score board
  • Classic and hexagon modes
  • Full unit test coverage

I'm proud of the work I put into creating a finished product, and I got pretty good marks for this assignment.

The code is available on GitHub gh