Code to check winning combination