Knight's Travails is an interactive web application that demonstrates the ability of a knight on a chessboard to move from one square to any other square, given enough steps. This project serves as an implementation of finding the shortest path between a knight and its destination using a breadth-first search algorithm. Take a peek at pathfinder.js
file.
This project was completed as a part of The Odin Project. Here's the project source.
Look at the project demo here.
- Interactive chessboard allowing users to move a knight and visualize the shortest path to a destination.
- Checkbox toggle to switch between moving the knight and the destination star.
- Dynamic highlighting of the path traveled by the knight.
To install the project, follow these steps:
git clone https://github.com/shravzzv/ODIN-Knights-Travails-project
cd ODIN-Knights-Travails-project
Open index.html
in your browser or using live server.
Explore the chessboard, click on squares to move the knight or set the destination star. Toggle between the knight and star movement using the provided toggle.
If you'd like to contribute, follow these steps:
-
Fork the repository on GitHub.
-
Clone your fork locally.
git clone https://github.com/shravzzv/ODIN-Knights-Travails-project cd ODIN-Knights-Travails-project
-
Create a new branch for your feature or bug fix.
git checkout -b feature-or-bug-fix-name
-
Make your changes, commit them, and push them to your fork.
git add . git commit -m "Your commit message here" git push origin feature-or-bug-fix-name
-
Open a Pull Request on GitHub, comparing your branch to the original repository's
main
branch.
Find a bug or want to request a new feature? Please let us know by submitting an issue.
This project is licensed under the MIT License - see the LICENSE file for details.