{"id":24977775,"url":"https://github.com/adzz/exercism_bowling","last_synced_at":"2025-08-01T21:08:21.349Z","repository":{"id":68120206,"uuid":"270013076","full_name":"Adzz/exercism_bowling","owner":"Adzz","description":null,"archived":false,"fork":false,"pushed_at":"2020-06-07T20:46:00.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T08:44:00.621Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","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/Adzz.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":"2020-06-06T14:55:16.000Z","updated_at":"2020-06-07T20:46:02.000Z","dependencies_parsed_at":"2023-02-22T09:30:21.516Z","dependency_job_id":null,"html_url":"https://github.com/Adzz/exercism_bowling","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Adzz/exercism_bowling","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adzz%2Fexercism_bowling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adzz%2Fexercism_bowling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adzz%2Fexercism_bowling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adzz%2Fexercism_bowling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Adzz","download_url":"https://codeload.github.com/Adzz/exercism_bowling/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adzz%2Fexercism_bowling/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268297305,"owners_count":24228123,"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","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"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":[],"created_at":"2025-02-03T23:09:13.685Z","updated_at":"2025-08-01T21:08:21.336Z","avatar_url":"https://github.com/Adzz.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bowling\n\nScore a bowling game.\n\nBowling is a game where players roll a heavy ball to knock down pins\narranged in a triangle. Write code to keep track of the score\nof a game of bowling.\n\n## Scoring Bowling\n\nThe game consists of 10 frames. A frame is composed of one or two ball\nthrows with 10 pins standing at frame initialization. There are three\ncases for the tabulation of a frame.\n\n* An open frame is where a score of less than 10 is recorded for the\n  frame. In this case the score for the frame is the number of pins\n  knocked down.\n\n* A spare is where all ten pins are knocked down by the second\n  throw. The total value of a spare is 10 plus the number of pins\n  knocked down in their next throw.\n\n* A strike is where all ten pins are knocked down by the first\n  throw. The total value of a strike is 10 plus the number of pins\n  knocked down in the next two throws. If a strike is immediately\n  followed by a second strike, then the value of the first strike\n  cannot be determined until the ball is thrown one more time.\n\nHere is a three frame example:\n\n| Frame 1         | Frame 2       | Frame 3                |\n| :-------------: |:-------------:| :---------------------:|\n| X (strike)      | 5/ (spare)    | 9 0 (open frame)       |\n\nFrame 1 is (10 + 5 + 5) = 20\n\nFrame 2 is (5 + 5 + 9) = 19\n\nFrame 3 is (9 + 0) = 9\n\nThis means the current running total is 48.\n\nThe tenth frame in the game is a special case. If someone throws a\nstrike or a spare then they get a fill ball. Fill balls exist to\ncalculate the total of the 10th frame. Scoring a strike or spare on\nthe fill ball does not give the player more fill balls. The total\nvalue of the 10th frame is the total number of pins knocked down.\n\nFor a tenth frame of X1/ (strike and a spare), the total value is 20.\n\nFor a tenth frame of XXX (three strikes), the total value is 30.\n\n## Requirements\n\nWrite code to keep track of the score of a game of bowling. It should\nsupport two operations:\n\n* `roll(pins : int)` is called each time the player rolls a ball.  The\n  argument is the number of pins knocked down.\n* `score() : int` is called only at the very end of the game.  It\n  returns the total score for that game.\n\n## Running tests\n\nExecute the tests with:\n\n```bash\n$ mix test\n```\n\n### Pending tests\n\nIn the test suites, all but the first test have been skipped.\n\nOnce you get a test passing, you can unskip the next one by\ncommenting out the relevant `@tag :pending` with a `#` symbol.\n\nFor example:\n\n```elixir\n# @tag :pending\ntest \"shouting\" do\n  assert Bob.hey(\"WATCH OUT!\") == \"Whoa, chill out!\"\nend\n```\n\nOr, you can enable all the tests by commenting out the\n`ExUnit.configure` line in the test suite.\n\n```elixir\n# ExUnit.configure exclude: :pending, trace: true\n```\n\nIf you're stuck on something, it may help to look at some of\nthe [available resources](https://exercism.io/tracks/elixir/resources)\nout there where answers might be found.\n\n## Source\n\nThe Bowling Game Kata at but UncleBob [http://butunclebob.com/ArticleS.UncleBob.TheBowlingGameKata](http://butunclebob.com/ArticleS.UncleBob.TheBowlingGameKata)\n\n## Submitting Incomplete Solutions\nIt's possible to submit an incomplete solution so you can see how others have completed the exercise.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadzz%2Fexercism_bowling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadzz%2Fexercism_bowling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadzz%2Fexercism_bowling/lists"}