Win/lose

code that determines win or lose