This application simulates a single tennis game between two players in a console-based environment.
The main purpose of this task is to assess coding skills, style, readability, and testability of the solution. Take your time, don't rush, and be creative. While correctness of the solution is important, demonstrating your coding skills and potential is equally valued.
- It is recommended to use a Git repository to manage your project.
- Organize your work into meaningful commits to track the development process.
- Each commit should represent a logical unit of work and include descriptive commit messages.
- Please refrain from proposing Pull Requests (PRs) to the current repository. Instead, we encourage you to submit a link to your repository containing the solution to the task.
This application simulates a single tennis game between two players in a console-based environment. The game follows standard tennis scoring rules, where players accumulate points to win a game.
- The tennis game is played between two players.
- Players start with a score of 0:0.
- Points are counted as 0, 15, 30, 40.
- When a player reaches 40 points:
- If the opponent also has 40 points (deuce), a player must win the next point to gain advantage.
- If a player with advantage wins the next point, they win the game.
- The game continues until one player wins by reaching four points and leading by at least two points, or until one player wins with a point after deuce.
- Start the application to begin a new tennis game.
- Enter 'A' or 'B' to score a point for Player A or Player B, respectively.
- The game will display the current score after each point.
- The game ends when a player wins by scoring the fourth point or breaks the deuce.
Starting a new tennis game.
Current Score: 0:0
Enter 'A' or 'B' for a point (e.g., A for Player A).
A
Current Score: 15:0
B
Current Score: 15:15
A
Current Score: 30:15
A
Current Score: 40:15
Player A wins the game!