This project is part of The Odin Project - Full Stack JavaScript Path. The main goal is to implement graph and breadth-first search and use it to solve a real world problem.
- JavaScript
- Npm
- Git
Your task is to build a function knightMoves that shows the shortest possible way to get from one square to another by outputting all squares the knight will stop on along the way.
- Put together a script that creates a game board and a knight.
- Treat all possible moves the knight could make as children in a tree. Don’t allow any moves to go off the board.
- Decide which search algorithm is best to use for this case. Hint: one of them could be a potentially infinite series.
- Use the chosen search algorithm to find the shortest path between the starting square (or node) and the ending square.