Add a function to check the game winner.