Checks if a player won the game or not