{"id":20384769,"url":"https://github.com/ogm710811/jsexercise","last_synced_at":"2025-03-04T23:13:52.572Z","repository":{"id":97190246,"uuid":"80301887","full_name":"ogm710811/jsexercise","owner":"ogm710811","description":"Ironhack | HTML \u0026 CSS | JS Exercise","archived":false,"fork":false,"pushed_at":"2017-01-29T02:15:47.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-15T08:10:17.028Z","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/ogm710811.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":"2017-01-28T18:25:04.000Z","updated_at":"2017-01-28T18:37:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"934bcae9-378a-47a5-9c66-df65aad2ec72","html_url":"https://github.com/ogm710811/jsexercise","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/ogm710811%2Fjsexercise","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ogm710811%2Fjsexercise/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ogm710811%2Fjsexercise/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ogm710811%2Fjsexercise/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ogm710811","download_url":"https://codeload.github.com/ogm710811/jsexercise/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241935267,"owners_count":20044827,"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-11-15T02:29:41.454Z","updated_at":"2025-03-04T23:13:52.532Z","avatar_url":"https://github.com/ogm710811.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Mars Rover Kata\n\nIntroduction\n\nWe are sending a rover to Mars and we need to program its movements so that\nwe can send it commands from Earth.\n\nBasic Information\n\nThe rover will have initial starting point (x,y) coordinates (i.e. 0,0)\nThe rover will have an initial direction (N,E,S,W) to where it is facing\nThe rover is on a 10 x 10 grid\nImplement commands that go forward and backward (f,b)\nImplement commands to turn the rover left or right (l,r). The rover just\nchange the direction it is facing when the user sets this command.\nIt won't move right or left automatically. To make it change its position,\nthe user needs to specify the change of direction and then the actual movement.\n\nIteration 1:-\n\n1) Create an object to represent the rover that has position and\ndirection attributes\n2) Create a grid using arrays (hint: do a google search for two-dimensional\narrays).\n3) Write functions for the various commands\n4) Try to call some of those functions and display the new position of\nthe rover.\n\nIteration 2:-\n\nWe want to be able to send a series of commands to the rover and execute\nthem in sequence.\n\nWe will send an array of character commands, which can include:\nf for go forward\nb for go back\nr for turn right*\nl for turn left*\n\nThe rover just change its direction when we use this command: r and l.\n\nIt won't move right or left automatically. To make it go right or left,\nthe user needs to specify the change of direction and then the actual movement.\n\nSo we should be able to tell the rover, for example, ‘fffrfflfffbb’\nand it would execute those movements and provide us with its new position.\n\nFurthermore, we need to make sure that the rover never goes off the grid\nbut rather, wraps from one edge of the grid to another\n(planets are spheres after all)\n\nBonus:\n\nIn your 10 x 10 grid, place some obstacles that the rover cannot cross or\nland on. Implement obstacle detection. The rover should execute the given\ncommands until it reaches an obstacle, then stop at the last possible position\nand report the obstacle.\n\nExtra hardcore super bonus:\nOur rover is lonely! We need to send another one that can roam on the same\ngrid and execute the same commands. Make sure the rovers don’t bump\ninto each other.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fogm710811%2Fjsexercise","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fogm710811%2Fjsexercise","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fogm710811%2Fjsexercise/lists"}