port of 2048 to python.