Kata > Tennis

A tennis match comprises three or five sets.

The first player to win a majority of the sets wins the match.

Each set comprises a minimum of 6 games.

A set is won by the first player to win at least six games with a margin of 2 above their opponent e.g. 6-3 or 7-5 although a tiebreak set is used when the score reaches 6-6.

At Wimbeldon, the tiebreak is instead done at 12-12 on the final set.

A tiebreak set is is won by the first player to reach at least 7 points and be 2 points clear of their oppponent.

Tiebreak sets are scored by single points - 1, 2, 3, ...

Each games comprises several points which are scored as "love", "15", "30", "40", and "game".

The first player to reach "game", wins the game.

However, if both players have forty then it's "deuce".

The next player to score in deuce gets "advantage".

If the player with advantage scores the next point, they win the game. Otherwise, it returns to deuce.

Keep track of the score during a tennis match.