Refactor game logic and messages