/StepsByKnightVisualiser

A visualiser for a famous BFS problem, minimum steps taken by knight to reach destination

Primary LanguagePython

StepsByKnightVisual

(This uses 0 base indexing) This is a visualiser of famous BFS Problem Steps By Knight made by me in PyGame https://practice.geeksforgeeks.org/problems/steps-by-knight5927/1 Given a square chessboard, the initial position of Knight and position of a target. Find out the minimum steps a Knight will take to reach the target position.

  1. Install pygame using "pip install pygame" or "pip3 install pygame".
  2. Change the Board Size according to you (there's a user prompt now).
  3. Put target & destination(in main function), coordinates should be less than board size.
  4. Run the file by "python knight.py" or "python3 knight.py"