Conways game of life
This demo is an adaptation of a text based Game of Life. The PySimpleGUI code was added to an existing engine. The GUI code is pretty well isolated, especially the board creation / setup code which is in a couple of class methods.
It demonstrates utilizing a
Graph element to draw rectanges based on user mouse clicks. This kind of interface works well on both a traditional window + mouse setup or on a tablet's touchscreen.
This same code can be run on Android for example using PyDroid3.
The "Published" version of this code can be found here: https://pysimplegui.trinket.io/sites/conways-game-of-life
It's the same output but done in a full-window, without the code being shown.