game.py totally refactored