togame source code in python