Skip to content

aidanTheCoder/Slide-Puzzle

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

The user was prompted for direction to slide an element of a puzzle board to arrange a set of integers in order. For compilation, the slide_puzzle_main.c and slide_puzzle_functions.c were compiled and the header file slide_game.h was included in the main file. The header file contained all the function prototypes and #define definitions. The main file is what managed the functions to play the game. The functions file contained code for ASCII art to display the title and when the game was complete and the logic for finding the empty spot to shift elements around. A random number generator was used to generate the board, but with no duplicates. Another algorithm was used to make sure every board generated would be possible to solve. Enjoy the game!

Languages

  • C 100.0%