{"id":50434616,"url":"https://github.com/top-submissions/foundations-rock-paper-scissors","last_synced_at":"2026-05-31T16:30:40.076Z","repository":{"id":303165142,"uuid":"1014564179","full_name":"top-submissions/foundations-rock-paper-scissors","owner":"top-submissions","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-15T00:59:52.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-03T13:54:15.590Z","etag":null,"topics":["foundations-path","the-odin-project"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/top-submissions.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-06T01:09:40.000Z","updated_at":"2025-12-19T06:56:54.000Z","dependencies_parsed_at":"2025-07-06T04:31:47.745Z","dependency_job_id":"4994a3ec-f956-482b-951a-e9985ee309f8","html_url":"https://github.com/top-submissions/foundations-rock-paper-scissors","commit_stats":null,"previous_names":["matimotthetimoters/rock-paper-scissors","top-submissions/foundations-rock-paper-scissors"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/top-submissions/foundations-rock-paper-scissors","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/top-submissions%2Ffoundations-rock-paper-scissors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/top-submissions%2Ffoundations-rock-paper-scissors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/top-submissions%2Ffoundations-rock-paper-scissors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/top-submissions%2Ffoundations-rock-paper-scissors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/top-submissions","download_url":"https://codeload.github.com/top-submissions/foundations-rock-paper-scissors/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/top-submissions%2Ffoundations-rock-paper-scissors/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33739860,"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-31T02:00:06.040Z","response_time":95,"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":["foundations-path","the-odin-project"],"created_at":"2026-05-31T16:30:38.145Z","updated_at":"2026-05-31T16:30:40.067Z","avatar_url":"https://github.com/top-submissions.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rock-paper-scissors\n\n## Checklist\n\n### Tasks:\n1. Touch files\n    - [x] index.html\n    - [x] script.js\n\n2. Initialize index.html\n    - [x] Boilerplate\n    - [x] Link to script.js\n\n3. Initialize script.js\n    - Variables\n        - [x] computerChoice\n        - [x] humanChoice\n        - [x] roundCount\n        - [x] computerScore\n        - [x] humanScore\n    - Functions\n        - [x] getComputerChoice\n        - [x] getHumanChoice\n        - [x] getRoundCount\n        - [x] playRound\n\n4. Create getComputerChoice function\n    - [x] Use Math.random function to get a value between 0 and 1\n    - [x] If value is 0-32, return rock\n    - [x] If value is 33-66, return paper\n    - [x] If value is 67-100, return scissors\n    - [x] Assign return value to computerChoice\n\n5. Create getHumanChoice function\n    - [x] Use prompt function to get choice\n    - [x] Use toLowerCase function to make case-insensitive\n    - [x] Assign return value to humanChoice\n\n6. Create getRoundCount function\n    - [x] Use prompt function to get choice\n    - [x] Assign return value to roundCount\n\n7. Create playRound function\n    - [x] Have computerChoice, humanChoice, roundCount as parameters\n    - [x] After round, increment scores, roundCount and print result to console\n\n8. Create calcScore function\n    - [x] Check if humanScore \u003e computerScore, print result\n    - [x] Check if humanScore \u003c computerScore, print result\n    - [x] Check if humanScore === computerScore, print result\n\n9. Build DOM structure in index.html:\n    - [x] Input element for round count\n    - [x] Buttons for human choice\n    - [x] Labels for computer choice\n    - [x] Play round button\n    - [x] Label for round win\n    - [x] Labels for current score\n    - [x] Label for game win\n\n10. Add styles to index.html elements\n    - [x] Display flex\n    - [x] FlexFlow column\n    - [x] FlexFlow row\n    - [x] Justify content\n    - [x] Align items\n    - [x] Justify items\n    - [x] Flex\n\n11. Add function to the Confirm button in round-count-container\n    - [x] Add event listener click \n    - [x] Assign round count value\n    - [x] Make sure that button becomes disabled after click\n    - [x] Fix button being disabled at the start\n\n12. Make Play Round button functional\n    - [x] Get radio buttons and play round button from DOM\n    - [x] Add event listener\n    - [x] Check each radio if checked\n    - [x] Assign to human choice\n    - [x] Call calculate results function\n\n13. Alter playRound function\n    - [x] Add fieldset to show current round and round winner\n    - [x] Add round-display-container to styles.css\n    - [x] Update current round display and winner\n\n14. Debug files\n    - [x] Fix round winner and round display not working\n    - [x] Fix roundCount not taking value from roundCountInput input element\n    - [x] Add label to display computer choice\n    - [x] Remove duplicate fieldset results-container","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftop-submissions%2Ffoundations-rock-paper-scissors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftop-submissions%2Ffoundations-rock-paper-scissors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftop-submissions%2Ffoundations-rock-paper-scissors/lists"}