Creating Minesweeper using BeeWare, Python, and Pygame
Up until now we have been using Toga as the GUI framework for BeeWare. This is not well suited for games, so we wanted to try Pygame which is another GUI option when generating an app using briefcase (Figure 1). It all went very smoothly, everything just worked.
Pygame is a cross-platform set of Python modules designed for writing video games. It includes computer graphics and sound libraries designed to be used with the Python programming language. Pygame is highly portable and runs on nearly all platforms (macOS, Windows, and Linux). It’s open-source and free to use, even for commercial projects.
Pygame is built on top of the SDL library (Simple DirectMedia Layer), leveraging its capabilities for low-level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL or DirectX.
Detonique
We didn’t want to spend a lot of time building the game mechanics, so we went with a relatively simple game design. Our game will be called Detonique and will be based on Minesweeper.