Skip to content

Instantly share code, notes, and snippets.

@PurpleBooth
Created September 24, 2019 06:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PurpleBooth/08a7fb2081835ca6bc0a155d6e41c742 to your computer and use it in GitHub Desktop.
Save PurpleBooth/08a7fb2081835ca6bc0a155d6e41c742 to your computer and use it in GitHub Desktop.

KataTennis

About this Kata

This Kata is about implementing a simple tennis game. I came up with it while thinking about Wii tennis, where they have simplified tennis, so each set is one game.

The scoring system is rather simple:

  1. Each player can have either of these points in one game

    • Love (0)
    • 15
    • 30
    • 40
    • Game
  2. If you have 40 and you win the ball you win the game, however there are special rules.

  3. If both have 40 the players are deuce.

    1. If the game is in deuce, the winner of a ball will have advantage and game ball.
    2. If the player with advantage wins the ball he wins the game
    3. If the player without advantage wins they are back at deuce.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment