This Kata is about implementing a simple tennis game. The game is between two players similar to a Singles Tennis match.
The scoring system is rather simple:
- A game is won by the first player to have won at least four points in total and at least two points more than the opponent.
- The running score of each game is described in a manner peculiar to tennis: scores from zero to three points are described as “Love”, “Fifteen”, “Thirty”, and “Forty” respectively.
- If at least three points have been scored by each player, and the scores are equal, the score is “deuce”.
- If at least three points have been scored by each side and a player has one more point than his opponent, the score of the game is “Advantage” for the player in the lead.
- JDK 1.8
- Maven 3.x
- Clone the repository https://github.com/ambpro/Kata-Tennis.git
- Add as maven project in your IDE
- Select project sdk as JDK 1.8
- Clone the project by following the setup instructions
- Open the command prompt / terminal from project repository
- Move to the project sub-directory
cd katatennis
- Run
mvn clean test
- Clone the project by following the setup instructions
- Run as Maven test
From console,
- Move to the sub-directory
cd katatennis
from the project repository - Run
mvn clean install
to build the application - Launch the application using
mvn exec:java
- Follow the onscreen instructions and proceed with the game until a player is a winner
- You can exit anytime by using 'C' or 'c' when prompted after starting the game or Terminate using abort command (Ctrl+C / Command+C)