Skip to content

Rajan-226/Block-Slider-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project description

The project is regarding the solution of Sliding puzzle in which a player have to move the tiles in a grid to reach a solution state of continuous numbers in the grid.

puzzle

Goals

  • Printing the least number of moves to reach the solution state or printing not possible if there is no solution.
  • Printing the moves to make to reach the solution state in minimum number of moves.

Specifications

  • Driver.c is the main C language program which takes input from user and finds the the minimum number of moves.
  • list.c is the C file for adding the visited states of game to a singly linked list with a linear seach operation.
  • queue.c is the C file for queue data structure implemented using singly linked list with node of a queue containing information about the parent state.

Design

  • Used Breadth-first search(BFS) to explore all the states of game until a solution state is reached.
  • Used singly linked list to add the visited states of game.
  • Used a linked list based queue for BFS which also deals with parent state of a state to generate the path to the solution
  • Maintained the grid in from of string of digits.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages