added win and lose conditions that seem to work