write player.py