{"id":20684906,"url":"https://github.com/crispab/bowling","last_synced_at":"2026-05-29T12:01:59.218Z","repository":{"id":81510684,"uuid":"192176674","full_name":"crispab/bowling","owner":"crispab","description":"Bowling kata","archived":false,"fork":false,"pushed_at":"2019-10-15T10:40:49.000Z","size":172,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-12-22T15:10:52.129Z","etag":null,"topics":["java","java-8","junit5","kata"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crispab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-16T10:13:36.000Z","updated_at":"2019-09-03T13:23:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"9d463692-afad-4e77-864a-33a1ee63f8e2","html_url":"https://github.com/crispab/bowling","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/crispab/bowling","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crispab%2Fbowling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crispab%2Fbowling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crispab%2Fbowling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crispab%2Fbowling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crispab","download_url":"https://codeload.github.com/crispab/bowling/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crispab%2Fbowling/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33650712,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["java","java-8","junit5","kata"],"created_at":"2024-11-16T22:24:36.170Z","updated_at":"2026-05-29T12:01:59.195Z","avatar_url":"https://github.com/crispab.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bowling kata\n\nClassical Bowling kata using Java and JUnit 5.\n\nThe task is to write a score calculator. The input is a string of characters and the\noutput is integer points. The characters are single digits numbers 1.9, \" \", \"-\", \"/\" and \"X\". The latter\nrepresents no roll, zero, spare and strike, respectively. The calculator shall handle partial inputs.\n\nSee below for explanation of those terms.\n\nAt the end, there are some suggestions for testing.\n\n### Implementation language\n\nThere are currently two catalogs, java and python. These give you \nthe opportunity to practice in different languages.\n\n## Scoring\n\nWikipedia: [https://en.wikipedia.org/wiki/Ten-pin_bowling#Scoring][https://en.wikipedia.org/wiki/Ten-pin_bowling#Scoring]\n\nThe most difficult part of bowling scoring to comprehend is when a strike or spare is scored, as the score on the \nscorecard does not get updated immediately.\n\nA game consists of **ten frames**, which start with a full rack of **ten pins**. In each frame, you have two deliveries \nof your ball, in which to knock down as many of the ten pins as you can.\n\n### Strike\nIf you knock down all the pins on your first ball, it is called a **strike**. The score doesn't get added on straight \naway because for a strike, you get the value of your next two balls as a bonus. \n\nFor example, if you score a strike in the first frame, then a 7 and 1 in the second frame, you would score 18 (10+7+1) \nfor the first frame, and 8 for the second frame, making a total of 26 after two frames.\n\n### Spare\nIf you knock down some of the pins on the first ball, and knocked down the remainder of the pins in the second ball, \nit is known as a **spare**. Again, the score does not get added on straight away because for a spare, you get the value \nof your next ball as a bonus. \n\nFor example, if you score a spare in the first frame, say a 6 and a 4, then got an 8 and a 1 in the second frame, \nyou would score 18 (6+4+8) for the first frame, and 9 for the second frame, making a total of 27 after two frames.\n\n### Final frame\n\nWhen it comes to the **final frame**, it is slightly different. In the final frame, you get bonus balls if you strike \nor spare, to a maximum of three deliveries. \n\nIf you strike in the first delivery you have the opportunity to strike in the remaining two and have three deliveries \nin total. If you scored strikes in each of your final three deliveries, the score for the final frame would \nbe 30 (10+10+10). \n\nIf you spare the final frame, you get the third delivery as a bonus. So, a spare, 9 and 1, followed \nby a strike would equal 20 (9+1+10).\n\n## Suggested test cases\n\nThe syntax is: each frame is two characters, except the last which three.\n\nRemember that the final frame is different. \n\n### Full game cases\n\n\"X X X X X X X X X XXX\" (12 rolls: 12 strikes) = 10 frames * 30 points = 300\n\n\"9-9-9-9-9-9-9-9-9-9- \" (20 rolls: 10 pairs of 9 and miss) = 10 frames * 9 points = 90\n\n\"5/5/5/5/5/5/5/5/5/5/5\" (21 rolls: 10 pairs of 5 and spare, with a final 5) = 10 frames * 15 points = 150\n\n### Partial game\n\n\"45\" = 1 Frame 4 + 5 = 9 \n\n\"3/\" = 1 Frame with spare but no following = 0\n\n\"3/2\" = 1 Frame with spare and a following roll = 10 + 2 = 12\n\n\"X \" = 1 Frame with strike but no following = 0\n\n\"X 2\" = 1 Frame with strike and a following roll = 0\n\n\"X 23\" = 2 Frame with strike in first = 10 + 2 + 3 + 2 + 3 = 20\n\n### Always true (for property testing)\n\nThe maximum points you can reach is 300. The minimum is 0. \n\nThere are never more than 10 frames but the final frame (10th) may have three rolls.\n\n\n[https://en.wikipedia.org/wiki/Ten-pin_bowling#Scoring]: https://en.wikipedia.org/wiki/Ten-pin_bowling#Scoring","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrispab%2Fbowling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrispab%2Fbowling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrispab%2Fbowling/lists"}