refactoring of game.py