Extracting game logic to its own class and advancing levels when a solution is found.