Refactored game logic into game service