The main function knightMoves shows the shortest possible way to get from one square to another by outputting all squares the knight will stop on along the way. The project is a part of The Odin Project's curriculum. The Odin Project provides a high quality web development education maintained by an open source community.
Open up your developer console to see all possible moves for the knight from each square on the chessboard. To find the shortest path, you can call the main knightMoves method with the starting and ending positions as parameters, like this:
chessboard.knightMoves([0,0],[7,7])
and you will get an output like this one:
['0,0', '1,2', '0,4', '1,6', '3,7', '5,6', '7,7']
- knightMoves: shows the shortest possible way to get from one square to another by outputting all squares the knight will stop on along the way
To Do:
- Add more game pieces
The project is built with:
- HTML
- Vanilla JavaScript
Tools
- Visual Studio Code
- Git
This section mentions the main topics covered during project work and prior lessons
- Algorithms and Data Structures
- Time and Space Complexity
- Breadth First Search and Depth First Search
- Graph Data Structure
- Set Object
The project is a great foundation for the Chess game project.
- Icon used for the favicon image is one of the Hierarchy icons created by Freepik - Flaticon.