Added win and lose condition