the game crashing is probably it leaking memory
the source code should work on macOS if you set up Python and Pygame