This project implements a program to simulate the legal moves of a knight on a 5x5 chessboard. The program allows users to explore and manage possible knight movement paths using data structures designed to store board positions and movement paths. Additionally, the program determines whether it is possible for the knight to perform a complete tour of the board, starting from a given position, such that the knight visits every position on the board exactly once.
- main.c: The main file, handling input/output and core program logic.
- Section1.h / section1.c: Functions to calculate all possible knight moves from any position on a 5x5 board.
- Section2.h / section2.c: Implementations of linked list structures to store possible movement paths.
- Section3.h / section3.c: Tree structures representing possible knight paths on the board.
- Section4.h / section4.c: Functions to manage and insert data into linked lists for valid knight moves.
- Standard C libraries like
stdio.h
,stdlib.h
, andstdbool.h
.
The project involves managing complex data structures and optimizing knight movement path calculations while adhering to the constraints of a 5x5 board.
Here is an example of how to use the program:
input =A5- you will see all the tour of the knight.
input =A2- not knight tour.