Skip to content

bengarusi/Chess-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chess Knight Moves on a 5x5 Board

Project Overview

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.

File Structure

  • 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.

System Requirements

  • Standard C libraries like stdio.h, stdlib.h, and stdbool.h.

Challenges and Insights

The project involves managing complex data structures and optimizing knight movement path calculations while adhering to the constraints of a 5x5 board.

Examples

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.

About

Simulates knight's moves on a 5x5 chessboard using efficient data structures.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages