A Python implementation of 2048 with a minimum GUI in 99 Physical LOC
Not Pythonic, PEP8 is not followed. I wrote this code because I'm boring.
Two modules are included:
-
Game control module. Based on numpy, use a 2d ndarray to store the tile values. It takes input of UP, DOWN, LEFT and RIGHT to step forward.
-
A minimum GUI based on Tk. The color style is referred to gabrielecirulli/2048.
for Windows
for Mac
If you can read Chinese you may find more details here: