{"id":20676901,"url":"https://github.com/cyberinferno/painting-robots-solution","last_synced_at":"2026-05-27T01:31:50.501Z","repository":{"id":70330069,"uuid":"135055370","full_name":"cyberinferno/painting-robots-solution","owner":"cyberinferno","description":null,"archived":false,"fork":false,"pushed_at":"2018-05-27T14:49:33.000Z","size":12,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-25T13:00:54.472Z","etag":null,"topics":["php7","phpunit-tests","symfony-console"],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/cyberinferno.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":"2018-05-27T14:48:19.000Z","updated_at":"2023-10-13T04:09:27.000Z","dependencies_parsed_at":"2023-04-27T20:31:32.548Z","dependency_job_id":null,"html_url":"https://github.com/cyberinferno/painting-robots-solution","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cyberinferno/painting-robots-solution","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyberinferno%2Fpainting-robots-solution","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyberinferno%2Fpainting-robots-solution/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyberinferno%2Fpainting-robots-solution/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyberinferno%2Fpainting-robots-solution/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cyberinferno","download_url":"https://codeload.github.com/cyberinferno/painting-robots-solution/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyberinferno%2Fpainting-robots-solution/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33546836,"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":"ssl_error","status_checked_at":"2026-05-26T15:22:15.568Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["php7","phpunit-tests","symfony-console"],"created_at":"2024-11-16T21:13:57.908Z","updated_at":"2026-05-27T01:31:50.449Z","avatar_url":"https://github.com/cyberinferno.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Painting Robots\n\n--== PROBLEM STATEMENT ==--\n\nA robotics company wants to do something special for its 50 year anniversary. The CEO decides that they should turn their glass building into a colorful mosaic using some of their own robots. So, a group of smart engineers comes up with a design for robots that can climb the glass building and install color filters on the glass panels.\n\nThe glass building can be considered a rectangular grid with each glass panel representing a cell. A robot's location is represented by x and y coordinates. It's heading is represented by one of four cardinal compass points. An example position could be \u003c0, 0, N\u003e, which means that the robot is at the bottom-left corner and facing up.\n\nTwo robots are built, each capable of installing a specific color filter, namely red (R) and green (G). The color filters are additive i.e. combining R and G produces yellow (Y).\n\nEach robot is capable of understanding the following commands:\n* L -- turn left 90 degrees\n* R -- turn right 90 degrees\n* F -- move forward 1 cell\n* I -- install color filter on the current cell\n\n--== INPUT ==--\n\nSimple command strings are written by the engineers to get the robots to color the building. \n\nThe first line of input represents the size of the building with the base index being \u003c0, 0\u003e.\n\nThe rest of the input is data pertaining to the robots. Each robot has two lines of input. The first line gives the robot's position and color, and the second line is the sequence of commands that tell the robot where to navigate.\n\nEach robot will finish its navigation sequentially, which means that the second robot won't start moving until the first one has finished moving.\n\n--== OUTPUT ==--\n\nThe output should be a grid of characters denoting the state of the building after all robots have completed their tasks.\n\nE = empty,\nR = red,\nG = green,\nY = yellow\n\n--== SAMPLE INPUT AND OUTPUT ==--\n\nInput:\n```\n5 5\n0 0 N R\nFFRFIFIRFIF\n4 0 N G\nFLFFRFIRFILFLFI\n```\n\nExpected output:\n```\nEEEEE\nEEGEE\nERYGE\nEEREE\nEEEEE\n```\n\n## Running the project\n\n* Run the command `composer install` to install dependencies\n* Run the command `php ./solution.php painting-robots` to open an interactive console application\n* To run tests use the command `./vendor/bin/phpunit --bootstrap ./vendor/autoload.php ./tests`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyberinferno%2Fpainting-robots-solution","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyberinferno%2Fpainting-robots-solution","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyberinferno%2Fpainting-robots-solution/lists"}