{"id":22678600,"url":"https://github.com/paulpls/knight-map","last_synced_at":"2025-03-29T13:12:51.640Z","repository":{"id":159644896,"uuid":"553241260","full_name":"paulpls/knight-map","owner":"paulpls","description":"Terminal-based mapping tool for exploring movement vectors in a 2d grid","archived":false,"fork":false,"pushed_at":"2023-05-04T08:08:56.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-04T13:44:52.502Z","etag":null,"topics":["chess","graph-theory","graph-theory-demo","graph-theory-visualization","knight","knight-problem","terminal-based"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paulpls.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-17T23:52:00.000Z","updated_at":"2022-10-21T19:36:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"5f179776-972d-4d53-987f-419a2fd5f180","html_url":"https://github.com/paulpls/knight-map","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/paulpls%2Fknight-map","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulpls%2Fknight-map/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulpls%2Fknight-map/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulpls%2Fknight-map/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paulpls","download_url":"https://codeload.github.com/paulpls/knight-map/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246187241,"owners_count":20737462,"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":["chess","graph-theory","graph-theory-demo","graph-theory-visualization","knight","knight-problem","terminal-based"],"created_at":"2024-12-09T18:15:55.309Z","updated_at":"2025-03-29T13:12:51.634Z","avatar_url":"https://github.com/paulpls.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![banner](https://user-images.githubusercontent.com/62158353/196378923-aadf87eb-f64b-44fb-932f-153afc182829.png)\n  \n# Knight Map\n  \nversion: 1.0.0  \nauthor: Paul Clayberg  \nlicense: [GPL 3.0](./LICENSE.md)  \n  \n\n## PURPOSE\n  \nGenerates a map based on the movements of the knight piece in chess.\n  \nGiven coordinates `(x,y)`, the knight can move to squares within the following set:\n  \n    N(x,y)  =  ( x ± a, y ± b )  ∪  ( x ± b, y ± a )\n            for a=1, b=2\n  \nThe knight's complex movement gives rise to many interesting patterns and scenarios. Because the vector is not a pair of even or odd numbers, the knight is forced to change color each time it moves. Due to this, it can only attack squares of an opposite color to its own. Moreover, once the knight moves, it will be able to attack only the same colored squares as that from which it came.\n  \nThis color-swapping compulsion makes some squares quickly reachable, but can be unforgiving in other cases. By making these movement patterns both visible and configurable, this tool aims to help to provide a better understanding of how the knight maneuvers around its environment. The movement vector *(a,b)* can also be changed to allow the study of other jumping pieces. The default value is `(1,2)`, but it can be set to any pair of positive, non-zero integers.  \n  \nOutput settings can be changed by modifying the parameters in [knight.py](./knight.py#L23). By placing more knights, friendly pieces, or changing the grid dimensions, countless scenarios can be studied.  \n  \n  \n  \n## SYNOPSIS\n  \n```\npython knight.py\n```\n  \n  \n  \n## DEPENDENCIES\n- python *(3.8.10)*\n- color terminal emulator *(eg xterm)*\n  \n\n  \n## LICENSE\n  \n    Copyright (C) 2022 Paul Clayberg\n    \n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n    \n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n    \n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see \u003chttps://www.gnu.org/licenses/\u003e.\n  \n\n  \n# SCREENSHOTS\n  \n**[1]** *Knight in the center, no labels*\n  \n![knight1](https://user-images.githubusercontent.com/62158353/196326404-e38a6b10-4705-476c-a7e6-8a9d596c1210.png)\n  \n  \n**[2]** *Knight unable to reach corner due to being blocked by friendlies*\n  \n![knight2](https://user-images.githubusercontent.com/62158353/196326415-230f916c-a8f2-49fa-bb21-ac0e09d72ba6.png)\n  \n  \n**[3]** *Knight unable to leave corner due to being blocked by friendlies*\n  \n![knight3](https://user-images.githubusercontent.com/62158353/196326425-7b5e1b58-08e4-48c0-9ab6-327711eff6bf.png)\n  \n  \n**[4]** *Two knights in opposite corners with some friendlies*\n  \n![knight4](https://user-images.githubusercontent.com/62158353/196326432-b25a76c1-5d7a-476f-826b-1f4adc7d6d40.png)\n  \n  \n**[5]** *Knight with only one escape path*\n  \n![knight5](https://user-images.githubusercontent.com/62158353/196326441-d9e8a576-d70a-4627-8921-8eb4b74959e1.png)\n  \n  \n**[6]** *Knight in corner, unblocked*\n  \n![knight6](https://user-images.githubusercontent.com/62158353/196326447-33f0a8c7-9d38-4cc1-8efc-9af690a828a5.png)\n  \n  \n  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulpls%2Fknight-map","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaulpls%2Fknight-map","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulpls%2Fknight-map/lists"}