Skip to content

The program finds a shortest path that the knight can take on a chessboard to move from a given starting position to a target position, visiting each square only once.

Notifications You must be signed in to change notification settings

berkaysson/Knights-Travails

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Knight's Travails

This repository contains an implementation of a Knight's Travails problem in chess. The code finds a shortest path that a knight can take on a chessboard to move from a given starting position to a target position, visiting each square only once.

Code Description

The code consists of the following files:

  • index.js: Contains an example usage of the knightsMoves function.
  • knights.js: Contains the main function knightsMoves that solves the Knight's Travails problem.

Usage

To use the code, follow these steps:

  1. Ensure you have Node.js installed on your system.
  2. Clone this repository to your local machine.
  3. Open a terminal and navigate to the project directory.
  4. Run the following command to execute the code:
node index.js

About

The program finds a shortest path that the knight can take on a chessboard to move from a given starting position to a target position, visiting each square only once.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published