Added a win and lose condition