{"id":22685368,"url":"https://github.com/tomaytotomato/pair-programming-task","last_synced_at":"2025-03-29T15:15:15.096Z","repository":{"id":205963915,"uuid":"715500380","full_name":"tomaytotomato/pair-programming-task","owner":"tomaytotomato","description":"A pair programming kata/task for the Wimbledon Tennis Company","archived":false,"fork":false,"pushed_at":"2023-11-07T09:54:04.000Z","size":56,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-04T15:51:51.224Z","etag":null,"topics":["kata","pair-programming","programming-challenges","task"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomaytotomato.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-11-07T09:16:10.000Z","updated_at":"2024-07-05T12:59:58.000Z","dependencies_parsed_at":"2023-11-07T10:52:04.446Z","dependency_job_id":null,"html_url":"https://github.com/tomaytotomato/pair-programming-task","commit_stats":null,"previous_names":["tomaytotomato/pair-programming-task"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomaytotomato%2Fpair-programming-task","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomaytotomato%2Fpair-programming-task/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomaytotomato%2Fpair-programming-task/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomaytotomato%2Fpair-programming-task/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomaytotomato","download_url":"https://codeload.github.com/tomaytotomato/pair-programming-task/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246200323,"owners_count":20739566,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kata","pair-programming","programming-challenges","task"],"created_at":"2024-12-09T22:14:35.384Z","updated_at":"2025-03-29T15:15:15.067Z","avatar_url":"https://github.com/tomaytotomato.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Game of Tennis Refactoring Kata\n\n# Time Limit\n\n1 hour (60 mins)\n\n# Situation\n\nThe Wimbledon Tennis Company employed a software developer to create a tennis scoring application.\n\nUnfortunately, the developer has taken a new job before the application could be declared finished.\n\nYou have been hired by the company to evaluate the codebase of this application and make any necessary changes to it.\n\nThe desired outcome of this should be that the application functions and performs to the specified business requirements.\n\n# Business Rules \n\nThe application uses the standard scoring rules for Tennis. \n\n| Points | Description |\n|--------|-------------|\n| 0      | Love        |\n| 1      | Fifteen     |\n| 2      | Thirty      |\n| 3      | Forty       |\n| 4      | Win         |\n\nFor a tennis player to win a game, they must win with at least a two point lead.\n\nIf the score is tied at 40 to 40 (what is called as a Deuce), a player must earn two consecutive points (an Advantage point and Point) to win the game. \n\nIf the player who has an Advantage point loses the next point, then it reverts back to Deuce once again.\n\nFor the sake of simplicity, we are only implementing the scoring of **one** game.\n\n### Example 1 - \"Alice wins\"\n\n| Action       | Bob | Alice | Output         |\n|--------------|-----|-------|----------------|\n| Game starts  | 0   | 0     | Love-All       |\n| Alice scores | 0   | 15    | Love-Fifteen   |\n| Bob scores   | 15  | 15    | Fifteen-All    |\n| Alice scores | 15  | 30    | Fifteen-Thirty |\n| Alice scores | 15  | 40    | Fifteen-Forty  |\n| Alice scores | 15  | Win   | Win for Alice  |\n\n### Example 2 - \"Deuce\"\n\n| Action       | Bob | Alice | Output         |\n|--------------|-----|-------|----------------|\n| Game starts  | 0   | 0     | Love-All       |\n| Bob scores   | 15  | 0     | Fifteen-Love   |\n| Bob scores   | 30  | 0     | Thirty-Love    |\n| Alice scores | 30  | 15    | Thirty-Fifteen |\n| Alice scores | 30  | 30    | Thirty-All     |\n| Alice scores | 30  | 40    | Thirty-Forty   |\n| Bob scores   | 40  | 40    | Deuce          |\n\n### Example 3 - \"Advantage\"\n\nAdvantage occurs when both players are at Deuce and one player scores, resulting in them having an advantage.\n\nIf they score again, they win.\n\n| Action       | Bob | Alice | Output              |\n|--------------|-----|-------|---------------------|\n|              | 40  | 40    | Deuce               |\n| Alice scores | 40  | Adv   | Advantage for Alice |\n| Alice scores | 40  | Win   | Win for Alice       |\n\n\n# Application Overview\n\nThe application is built with **Spring Boot** and provides a single RESTful endpoint to score and report back the score for a given Game of Tennis.\n\nThe application also sends the score of the game to be displayed on a scoreboard seen by the audience.\n\nThere is no Database or other persistence being used by the application.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomaytotomato%2Fpair-programming-task","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomaytotomato%2Fpair-programming-task","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomaytotomato%2Fpair-programming-task/lists"}