refactored the code to include scenes, a game state and a winning state