Re-implement game logic using the singleton pattern