Separation of game logic