The algorithm checks for winnings. The check is done by the sum.