Code for winning combinations, but it is not working