{"id":23428690,"url":"https://github.com/mekaem/gobowling","last_synced_at":"2025-04-09T13:19:48.928Z","repository":{"id":262148582,"uuid":"869977453","full_name":"fklr/gobowling","owner":"fklr","description":"A bowling game implementation in Go (interview question)","archived":false,"fork":false,"pushed_at":"2024-10-10T11:03:25.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-04T06:35:52.435Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/fklr.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-09T08:25:53.000Z","updated_at":"2024-10-10T11:03:29.000Z","dependencies_parsed_at":"2024-11-10T20:40:34.213Z","dependency_job_id":"f305a495-f627-4064-b060-66fb48da26ec","html_url":"https://github.com/fklr/gobowling","commit_stats":null,"previous_names":["mekaem/gobowling","fklr/gobowling"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fklr%2Fgobowling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fklr%2Fgobowling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fklr%2Fgobowling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fklr%2Fgobowling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fklr","download_url":"https://codeload.github.com/fklr/gobowling/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248045266,"owners_count":21038557,"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":[],"created_at":"2024-12-23T07:14:29.339Z","updated_at":"2025-04-09T13:19:48.695Z","avatar_url":"https://github.com/fklr.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gobowling\n\nA bowling game implementation in Go (interview question)\n\n## Prompt\n\nWrite a class \"Bowling\" that allows one to solve rolls and scores.\n\n---------------------------\n--    RULES OF BOWLING   --\n---------------------------\n\n- 10 frames per game (Think of frames as turns)\n- Every frame is scored independently\n- Total score of the game is sum(frame scores)\n- 10 Pins available to knock down in each frame\n- Up to 2 rolls per frame (Think of rolls as attempts. You get two attempts per frame to knock down all pins)\n\n---------------------------\n--    SCORING A FRAME    --\n---------------------------\n1. If the 2 Rolls sum to less than 10, then the score of the Frame is the sum of the Rolls. Nothing special.\n2. If you roll a Spare, the score of the Frame is 10 + the next Roll\n3. If you roll a Strike, the score of the Frame is 10 + the next 2 Rolls\n4. The tenth frame is different, there is the possibility of 3 rolls\n    A. If you score a strike, you get two more rolls (3 rolls total)\n    B. If you score a spare, you get one extra roll (3 rolls total)\n    C. If you don't score a strike or spare, just a regular frame (2 rolls total)\n\n---------------------------\n--       EXAMPLE 1       --\n---------------------------\nFrame 1: Rolls =\u003e 3 \u0026 4\nFrame 1 has a score of 7 =\u003e 3 + 4\n\n---------------------------\n--       EXAMPLE 2       --\n---------------------------\nFrame 1: Rolls =\u003e 6 \u0026 4\nFrame 2: Rolls =\u003e 3 \u0026 4\n\nFrame 1 has a score of 13 =\u003e (6+4) + 3\nFrame 2 has a score of 7 =\u003e 3 + 4\n\nThe total score so far is 20 =\u003e (13 + 7)\n\n---------------------------\n--       EXAMPLE 3       --\n---------------------------\nFrame 1: Rolls =\u003e 10\nFrame 2: Rolls =\u003e 3 \u0026 4\n\nFrame 1 has a score of 17 =\u003e 10 + (3 + 4)\nFrame 2 has a score of 7 =\u003e 3 + 4\n\nThe total score so far is 24 =\u003e 17 + 7\n\n---------------------------\n--       EXAMPLE 4       --\n---------------------------\nFrame 1: Rolls =\u003e 10\nFrame 2: Rolls =\u003e 10\nFrame 3: Rolls =\u003e 3 \u0026 4\n\nFrame 1 has a score of 23 =\u003e 10 + 10 + 3\nFrame 2 has a score of 17 =\u003e 10 + (3 + 4)\nFrame 3 has a score of 7 =\u003e 3 + 4\n\nThe total score so far is 47 =\u003e 23 + 17 + 7\n\n\n---------------------------\n-- Tenth Frame Example 1 --\n---------------------------\nFrame 10, Roll 1: 10  // This is a strike so two more rolls are allowed\nFrame 10, Roll 2: 5\nFrame 10, Roll 3: 5\n\nTotal score for 10th frame is 20 =\u003e 10 + 5 + 5\n\n\n---------------------------\n-- Tenth Frame Example 2 --\n---------------------------\nFrame 10, Roll 1: 5\nFrame 10, Roll 2: 5  // This is a spare, one more roll are allowed\nFrame 10, Roll 3: 10\n\nTotal score for 10th frame is 20 =\u003e 5 + 5 + 10\n\n\n---------------------------\n-- Tenth Frame Example 3 --\n---------------------------\nFrame 10, Roll 1: 2\nFrame 10, Roll 2: 5  // NOT a strike or spare, game is over\n\nTotal score for 10th frame is 7 =\u003e 2 + 5\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmekaem%2Fgobowling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmekaem%2Fgobowling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmekaem%2Fgobowling/lists"}