{"id":32310979,"url":"https://github.com/jdleung/jdastar","last_synced_at":"2026-05-14T22:49:33.205Z","repository":{"id":62457640,"uuid":"496107017","full_name":"jdleung/JDAStar","owner":"jdleung","description":"A simple path finding library based on the A*(A-Star) algorithm.","archived":false,"fork":false,"pushed_at":"2022-06-02T03:38:55.000Z","size":11029,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-23T09:30:59.598Z","etag":null,"topics":["a-star","algorithm","astar","ios","macos","pathfinding","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jdleung.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-05-25T06:20:00.000Z","updated_at":"2023-11-07T08:32:53.000Z","dependencies_parsed_at":"2022-11-02T00:17:45.655Z","dependency_job_id":null,"html_url":"https://github.com/jdleung/JDAStar","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/jdleung/JDAStar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdleung%2FJDAStar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdleung%2FJDAStar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdleung%2FJDAStar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdleung%2FJDAStar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jdleung","download_url":"https://codeload.github.com/jdleung/JDAStar/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdleung%2FJDAStar/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280591290,"owners_count":26356542,"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","status":"online","status_checked_at":"2025-10-23T02:00:06.710Z","response_time":142,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["a-star","algorithm","astar","ios","macos","pathfinding","swift"],"created_at":"2025-10-23T09:02:56.764Z","updated_at":"2025-10-23T09:02:58.015Z","avatar_url":"https://github.com/jdleung.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JDAStar\n\n[![Version](https://img.shields.io/cocoapods/v/JDAStar.svg?style=flat)](https://cocoapods.org/pods/JDAStar)\n[![License](https://img.shields.io/cocoapods/l/JDAStar.svg?style=flat)](https://cocoapods.org/pods/JDAStar)\n[![Platform](https://img.shields.io/cocoapods/p/JDAStar.svg?style=flat)](https://cocoapods.org/pods/JDAStar)\n\nA simple path finding library based on the A*(A-Star) algorithm.\n\n\u003cimg src=\"screenshot.gif\" /\u003e\n\n## Example\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n## Requirements\n\n- iOS 9.0+\n- macOS 11.0+\n- Swift 4.0+\n\n## Installation\n\nJDAStar is available through [CocoaPods](https://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\nsource 'https://github.com/CocoaPods/Specs.git'\npod 'JDAStar'\n```\n## Usage\n\n```Swift\nvar starTrek: JDAStarTrek?\n\n// JDAStarNode contains properties col, row, idx\nvar pathNodes = [JDAStarNode]()\n\n// Initialize map size and path mode\nstarTrek = JDAStarTrek(cols: 15, rows: 26, isDiagonalEnable: false)\n\n// Dianymically set size and path mode\nstarTrek?.setMapSize(cols: 23, rows: 40)\nstarTrek?.isDiagonalEnabled = true\n```\n\nFind path by indexes\n\n```Swift\nif let pn = starTrek?.findPath(startIndex: 0,\n                               endIndex: 72,\n                               blockIndexes: [6, 12]) {\n    pathNodes = pn\n}\n```\n\nFind path by positions\n\n```Swift\nif let pn = starTrek?findPath(startPosition: AStarPosition(col: 0, row: 0),\n                                endPosition: AStarPosition(col: 7, row: 12), \n\t\t\t\t\t\t\t\tblockPosition: []) {\n\tpathNodes = pn\n}\n```\n## License\n\nJDAStar is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdleung%2Fjdastar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjdleung%2Fjdastar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdleung%2Fjdastar/lists"}