{"id":23646879,"url":"https://github.com/anthgrim/bonusball","last_synced_at":"2025-11-12T00:30:13.448Z","repository":{"id":43878683,"uuid":"455777804","full_name":"anthgrim/BonusBall","owner":"anthgrim","description":"MIT Course Extra Bonus Ball Exercise","archived":false,"fork":false,"pushed_at":"2022-02-19T19:21:18.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-28T13:40:47.102Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/anthgrim.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}},"created_at":"2022-02-05T04:50:05.000Z","updated_at":"2022-02-06T23:53:25.000Z","dependencies_parsed_at":"2022-08-29T23:00:44.200Z","dependency_job_id":null,"html_url":"https://github.com/anthgrim/BonusBall","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/anthgrim%2FBonusBall","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthgrim%2FBonusBall/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthgrim%2FBonusBall/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthgrim%2FBonusBall/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anthgrim","download_url":"https://codeload.github.com/anthgrim/BonusBall/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239597187,"owners_count":19665682,"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-28T13:40:57.876Z","updated_at":"2025-11-12T00:30:13.385Z","avatar_url":"https://github.com/anthgrim.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bonus Ball Coding Challenge - Full Stack With MERN MIT/xPro\n\n## Description\n\nThis coding challenge is based on previous exercises of the Week 3 of the course.\nThe student is assigned with a task to add whatever new features is posible to create\nfor the student at this point of the course. \n\nThis repository, showcases the a series of buttons to trigger an action directly to the ball\nelement, such as: \n\n1. Hide. When clicking this button, we add a class called **hide** which set the display property to none.\n2. Unhide. This button removes the class **hide** from the ball element.\n3. Get Random colors. This button triggers an event listener that calls the function **randomRGB** which returns a random rgb cluster, then this result is set to the background color of the ball element.\n4. Move Right. This button triggers an event listener to move the ball element to the right.\n5. Move Left. This button triggers an event listener to move the ball element to the left.\n6. Move Down. This button triggers an event listener to move the ball element down.\n7. Move Up. This button triggers an event listener to move the ball element up.\n8. Random Ball. This button adds an interval to the ball to repeat a movement from left to right, and reversing direction when hitting an edge. \n9. Stop Random. Stops the random ball interval.\n\n## Functions used\n\n* calculateMove: Is a function that needs three arguments, the ball element, moveType and moveDirection. This function prompts the user to input the number of pixels the ball should move in the respective direction. This input is parse to an integer to make the calculations possible. Then it gets the current position on X or Y, depending on the move direction that was passed, and then adds the move direction to a result variable. This result will depend on the move type (plus or minus).\n\n### Link to the gitPage\n\nhttps://anthgrim.github.io/BonusBall/","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthgrim%2Fbonusball","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanthgrim%2Fbonusball","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthgrim%2Fbonusball/lists"}