{"id":18886920,"url":"https://github.com/lostjared/knights_tour","last_synced_at":"2026-02-23T20:30:21.093Z","repository":{"id":239336418,"uuid":"799254754","full_name":"lostjared/Knights_Tour","owner":"lostjared","description":"Knights Tour Simulation in Rust with SDL2","archived":false,"fork":false,"pushed_at":"2024-10-12T01:58:11.000Z","size":638,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-31T05:17:33.483Z","etag":null,"topics":["chess","knights-tour","simulation"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/lostjared.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-11T15:35:14.000Z","updated_at":"2024-10-12T01:58:15.000Z","dependencies_parsed_at":"2024-05-17T17:31:38.182Z","dependency_job_id":"f191170f-5887-443f-a641-c0dd7ea51450","html_url":"https://github.com/lostjared/Knights_Tour","commit_stats":null,"previous_names":["lostjared/knights_tour"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lostjared%2FKnights_Tour","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lostjared%2FKnights_Tour/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lostjared%2FKnights_Tour/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lostjared%2FKnights_Tour/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lostjared","download_url":"https://codeload.github.com/lostjared/Knights_Tour/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239859566,"owners_count":19708861,"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","knights-tour","simulation"],"created_at":"2024-11-08T07:32:05.064Z","updated_at":"2026-02-23T20:30:21.026Z","avatar_url":"https://github.com/lostjared.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Knights Tour Simulation\n\n![board](https://github.com/lostjared/Knights_Tour/blob/main/screens/tour.jpg)\n\n\nThis project implements a Knights Tour simulation using Rust and SDL2. The goal of the simulation is to move a knight around a chessboard, touching each square exactly once.\n\n## Features\n\n- Displays an 8x8 chessboard\n- Moves the knight to each square on the board exactly once\n- Shows the current state of the tour and indicates when the tour is complete\n- Allows users to restart the tour by pressing `Enter`\n\n## Requirements\n\n- Rust\n- SDL2\n- SDL2_ttf\n\n## Installation\n\n1. Ensure you have Rust installed. If not, you can install it from [rust-lang.org](https://www.rust-lang.org/).\n2. Install SDL2 and SDL2_ttf on your system. For installation instructions, refer to [SDL2 Installation Guide](https://github.com/Rust-SDL2/rust-sdl2#user-content-requirements).\n3. Clone this repository:\n\n```sh\ngit clone https://github.com/lostjared/Knights_Tour.git\ncd Knights_Tour/knights_tour\n```\n\n4. Build the project using Cargo:\n\n```sh\ncargo build --release\n```\n\n5. Run the executable:\n\n```sh\ncargo run --release\n```\n\n![board2](https://github.com/lostjared/Knights_Tour/blob/main/screens/tour.gif)\n\n## Usage\n\n- Press `Space` to move the knight to the next position.\n- Press `Enter` to restart the tour.\n- Press `Escape` to exit the simulation.\n\n## Code Structure\n\n- **Position**: Represents the knight's position on the board.\n- **drawboard**: Draws the chessboard on the SDL2 canvas.\n- **drawknight**: Draws the knight at its current position on the board.\n- **clearboard**: Clears the board for a new tour.\n- **nextmove**: Calculates the knight's next move using Warnsdorff's rule.\n\n## Assets\n\n- `data/font.ttf`: The font used for rendering text.\n- `data/knight.bmp`: The knight image used for the simulation.\n\n## Contributing\n\nIf you would like to contribute to this project, please fork the repository and submit a pull request.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.\n\n## Acknowledgments\n\nThis project uses the following libraries and resources:\n\n- [SDL2](https://www.libsdl.org/)\n- [Rust-SDL2](https://github.com/Rust-SDL2/rust-sdl2)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flostjared%2Fknights_tour","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flostjared%2Fknights_tour","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flostjared%2Fknights_tour/lists"}