{"id":21474001,"url":"https://github.com/bell-kevin/codewars-style-ranking-system","last_synced_at":"2025-10-27T08:46:12.021Z","repository":{"id":43425701,"uuid":"508837212","full_name":"bell-kevin/Codewars-style-ranking-system","owner":"bell-kevin","description":"Codewars style ranking system. 4 kyu. Write a class called User that is used to calculate the amount that a user will progress through a ranking system similar to the one Codewars uses.  Business Rules: A user starts at rank -8 and can progress all the way to 8. There is no 0 (zero) rank. The next rank after -1 is 1. Users will complete activities. These activities also have ranks. Each time the user completes a ranked activity the users rank progress is updated based off of the activity's rank The progress earned from the completed activity is relative to what the user's current rank is compared to the rank of the activity A user's rank progress starts off at zero, each time the progress reaches 100 the user's rank is upgraded to the next level Any remaining progress earned while in the previous rank will be applied towards the next rank's progress (we don't throw any progress away). The exception is if there is no other rank left to progress towards (Once you reach rank 8 there is no more progression). A user cannot progress beyond rank 8. The only acceptable range of rank values is -8,-7,-6,-5,-4,-3,-2,-1,1,2,3,4,5,6,7,8. Any other value should raise an error. The progress is scored like so:  Completing an activity that is ranked the same as that of the user's will be worth 3 points Completing an activity that is ranked one ranking lower than the user's will be worth 1 point Any activities completed that are ranking 2 levels or more lower than the user's ranking will be ignored Completing an activity ranked higher than the current user's rank will accelerate the rank progression. The greater the difference between rankings the more the progression will be increased. The formula is 10 * d * d where d equals the difference in ranking between the activity and the user. Logic Examples: If a user ranked -8 completes an activity ranked -7 they will receive 10 progress If a user ranked -8 completes an activity ranked -6 they will receive 40 progress If a user ranked -8 completes an activity ranked -5 they will receive 90 progress If a user ranked -8 completes an activity ranked -4 they will receive 160 progress, resulting in the user being upgraded to rank -7 and having earned 60 progress towards their next rank If a user ranked -1 completes an activity ranked 1 they will receive 10 progress (remember, zero rank is ignored)","archived":false,"fork":false,"pushed_at":"2022-07-06T22:39:07.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T16:49:27.960Z","etag":null,"topics":["codewars-kata-solution"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bell-kevin.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}},"created_at":"2022-06-29T20:31:07.000Z","updated_at":"2022-06-29T20:31:57.000Z","dependencies_parsed_at":"2022-07-08T00:10:33.621Z","dependency_job_id":null,"html_url":"https://github.com/bell-kevin/Codewars-style-ranking-system","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bell-kevin%2FCodewars-style-ranking-system","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bell-kevin%2FCodewars-style-ranking-system/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bell-kevin%2FCodewars-style-ranking-system/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bell-kevin%2FCodewars-style-ranking-system/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bell-kevin","download_url":"https://codeload.github.com/bell-kevin/Codewars-style-ranking-system/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243991003,"owners_count":20379896,"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":["codewars-kata-solution"],"created_at":"2024-11-23T10:19:38.536Z","updated_at":"2025-10-04T18:01:34.869Z","avatar_url":"https://github.com/bell-kevin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Codewars-style-ranking-system\nCodewars style ranking system. 4 kyu. Write a class called User that is used to calculate the amount that a user will progress through a ranking system similar to the one Codewars uses.  Business Rules: A user starts at rank -8 and can progress all the way to 8. There is no 0 (zero) rank. The next rank after -1 is 1. Users will complete activities. These activities also have ranks. Each time the user completes a ranked activity the users rank progress is updated based off of the activity's rank The progress earned from the completed activity is relative to what the user's current rank is compared to the rank of the activity A user's rank progress starts off at zero, each time the progress reaches 100 the user's rank is upgraded to the next level Any remaining progress earned while in the previous rank will be applied towards the next rank's progress (we don't throw any progress away). The exception is if there is no other rank left to progress towards (Once you reach rank 8 there is no more progression). A user cannot progress beyond rank 8. The only acceptable range of rank values is -8,-7,-6,-5,-4,-3,-2,-1,1,2,3,4,5,6,7,8. Any other value should raise an error. The progress is scored like so:  Completing an activity that is ranked the same as that of the user's will be worth 3 points Completing an activity that is ranked one ranking lower than the user's will be worth 1 point Any activities completed that are ranking 2 levels or more lower than the user's ranking will be ignored Completing an activity ranked higher than the current user's rank will accelerate the rank progression. The greater the difference between rankings the more the progression will be increased. The formula is 10 * d * d where d equals the difference in ranking between the activity and the user. Logic Examples: If a user ranked -8 completes an activity ranked -7 they will receive 10 progress If a user ranked -8 completes an activity ranked -6 they will receive 40 progress If a user ranked -8 completes an activity ranked -5 they will receive 90 progress If a user ranked -8 completes an activity ranked -4 they will receive 160 progress, resulting in the user being upgraded to rank -7 and having earned 60 progress towards their next rank If a user ranked -1 completes an activity ranked 1 they will receive 10 progress (remember, zero rank is ignored)\n\n\n== We're Using GitHub Under Protest ==\n\nThis project is currently hosted on GitHub.  This is not ideal; GitHub is a\nproprietary, trade-secret system that is not Free and Open Souce Software\n(FOSS).  We are deeply concerned about using a proprietary system like GitHub\nto develop our FOSS project.  We have an\n[open {bug ticket, mailing list thread, etc.} ](INSERT_LINK) where the\nproject contributors are actively discussing how we can move away from GitHub\nin the long term.  We urge you to read about the\n[Give up GitHub](https://GiveUpGitHub.org) campaign from\n[the Software Freedom Conservancy](https://sfconservancy.org) to understand\nsome of the reasons why GitHub is not a good place to host FOSS projects.\n\nIf you are a contributor who personally has already quit using GitHub, please\n[check this resource](INSERT_LINK) for how to send us contributions without\nusing GitHub directly.\n\nAny use of this project's code by GitHub Copilot, past or present, is done\nwithout our permission.  We do not consent to GitHub's use of this project's\ncode in Copilot.\n\n![Logo of the GiveUpGitHub campaign](https://sfconservancy.org/img/GiveUpGitHub.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbell-kevin%2Fcodewars-style-ranking-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbell-kevin%2Fcodewars-style-ranking-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbell-kevin%2Fcodewars-style-ranking-system/lists"}