{"id":16696709,"url":"https://github.com/atry/islandmap","last_synced_at":"2025-03-14T03:11:39.634Z","repository":{"id":142738053,"uuid":"137790653","full_name":"Atry/islandmap","owner":"Atry","description":null,"archived":false,"fork":false,"pushed_at":"2018-07-11T01:50:30.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-20T22:13:08.909Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Scala","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/Atry.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-06-18T18:25:31.000Z","updated_at":"2018-07-11T01:50:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"d6433b20-2a12-4d54-8ebe-6074c3fe7d67","html_url":"https://github.com/Atry/islandmap","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/Atry%2Fislandmap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atry%2Fislandmap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atry%2Fislandmap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atry%2Fislandmap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Atry","download_url":"https://codeload.github.com/Atry/islandmap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243515567,"owners_count":20303258,"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-10-12T17:44:37.849Z","updated_at":"2025-03-14T03:11:39.614Z","avatar_url":"https://github.com/Atry.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"A homework example for [Zhihu live #989463080031543296](https://www.zhihu.com/lives/989463080031543296).\n\n## Architecture\n\nThe homework consists with 4 modules:\n\n![](islandmap.gv.svg)\n\n### Main\n\nThe `Main` module performs I/O to produce required information. It uses `Parser` to load the sample data, and uses `IslandMapBuilder` to separate the grid into islands.\n\n### models\n\nThe `models` module defines the types of grids.\n\n### Parser\n\nThe `Parser` module loads grids from text.\n\n### IslandMapBuilder\n\nThe `IslandMapBuilder` module analyzes the land grid and group it into islands. It uses depth first search to determine which positions belong to an island.\n \n## Deployment\n\n### System requirement\n\n * [Java 8](http://www.oracle.com/technetwork/java/javase/downloads/index.html)\n * [Scala 2.12.x](http://scala-lang.org/download/)\n * [Sbt 1.x](http://www.scala-sbt.org/download.html)\n\n### Compiling\n\nRun the following command-line at the root path of the homework:\n\n```\nsbt package\n```\n\nNow you will find that `target/scala-2.12/islandmap_2.12-1.0.0.jar` is built.\n\n### Generating ScalaDoc\n\nRun the following command-line at the root path of the homework:\n\n```\nsbt doc\n```\n\nNow you could navigate to `target/scala-2.12/api/index.html` to see the documentation.\n\n### Testing\n\n#### Unit test\n\nRun the following command-line at the root path of the homework:\n\n```\nsbt test\n```\n\nThis will run `IslandMapBuilderSpec` and `ParserSpec` in `src/test/scala`.\n\n#### Test with an external input file\n\nRun the following command-line at the root path of the homework:\n\n```\nsbt \"run input.txt\"\n```\n\nor\n\n```\nscala target/scala-2.12/islandmap_2.12-1.0.0.jar input.txt\n```\n\nPlease verify if the output is the same as the expected output in the problem description.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatry%2Fislandmap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatry%2Fislandmap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatry%2Fislandmap/lists"}