{"id":23119540,"url":"https://github.com/programmerdan/magrathea2","last_synced_at":"2025-04-04T02:41:33.045Z","repository":{"id":14614230,"uuid":"17331524","full_name":"ProgrammerDan/magrathea2","owner":"ProgrammerDan","description":"Magrathea 2.0 -- Our planet building friends have downsized to building mountain ranges. code-golf submission for a question of this name.","archived":false,"fork":false,"pushed_at":"2014-03-02T05:28:01.000Z","size":140,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-09T14:24:04.354Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ProgrammerDan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-02T05:23:28.000Z","updated_at":"2014-03-02T05:28:02.000Z","dependencies_parsed_at":"2022-09-18T09:21:31.964Z","dependency_job_id":null,"html_url":"https://github.com/ProgrammerDan/magrathea2","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/ProgrammerDan%2Fmagrathea2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProgrammerDan%2Fmagrathea2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProgrammerDan%2Fmagrathea2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProgrammerDan%2Fmagrathea2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ProgrammerDan","download_url":"https://codeload.github.com/ProgrammerDan/magrathea2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247112727,"owners_count":20885605,"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-17T05:39:14.383Z","updated_at":"2025-04-04T02:41:33.031Z","avatar_url":"https://github.com/ProgrammerDan.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Magrathea 2.0\n=============\n\nThis is a solution to the code-golf problem [Magrathea 2.0](http://codegolf.stackexchange.com/questions/22192/magrathea-2-0-building-mountains). Feel free to fork and improve.\n\nA few usage notes:\n\n**Input**\n\nThe input should follow this format (from code-golf problem):\n\nA string of dots and digits providing the basis for the mountain chain. Each string is exactly as long as necessary to support the mountains and each peak is given by a digit instead of a dot, indicating the height of the peak.\n\nExample:\n\n    ..3..2.\n\n**Output**\n\nAn ascii version of the mountain chain.\n\n* Each digit in the input represents exactly one peak (^) at exactly the height indicated by the digit (i.e. 9 is the highest height).\n* There must not be additional peaks in the output (i.e. at places where there is a dot in the input).\n* Mountains are of triangular shape, i.e. slopes are created using / and \\ characters.\n* Passes where two mountains overlap are shaped using the character v.\n\nThere are a few other requirements in the code-golf problem, that I follow but contribute nothing to understanding.\n\n**Execution**\n\nYou use any of the `.java` files in this repository. `Magrathea.java` is standalone, and can be run without any additional inputs. It was my testing harness for development and min-ification. `Magrathea2.java` is a human-readable form of the final submission. Execute it by passing in a valid input sequence as described in the input section. Finally, `M.java` is the code-golf min-ified version of the code. Execute it the same as `Magrathea2.java` by passing it a valid input sequence.\n\n**Closing notes**\n\nThis solution weighs in at 407 characters. I'm sure I could do better with some more thought, but this was a lark and I'm pretty pleased with what I was able to do.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprogrammerdan%2Fmagrathea2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprogrammerdan%2Fmagrathea2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprogrammerdan%2Fmagrathea2/lists"}