In a chess tournament, each player plays every other player exactly once. If it is known that 36 games were played, how many players were there in the tournament?