Refactoring interaction with game server