Skip to content

weihotline/KnightTravails

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Knight's Travails

This app helps to find the shortest path for a Chess Knight from a starting position to an end position. The objective of this app is to show how to implement two algorithms of traversing a tree: Depth First Search (DFS) and Breadth First Search (BFS).

Design

Each tree node represents a position on a board.

  • DFS (traverses the left child until the end position is found. If it has been visited, we try to visit right child.)
  • BFS (visits a node, then each of its children, then each of their children, etc.)

Testing

This app is tested by running rspec.

 rspec spec/*

Disclaimer

This application is intended as a demo of techniques. The design pattern and specs belong to App Academy. Please feel free to contact me at weihotline@gmail.com if you have any questions or concerns.

About

This app helps to find a path for a Chess Knight from a starting position to an end position via BFS or DFS.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages