Skip to content

panki/15-puzzle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

15-puzzle

The 15-puzzle (also called Gem Puzzle, Boss Puzzle, Game of Fifteen, Mystic Square and many others) is a sliding puzzle that consists of a frame of numbered square tiles in random order with one tile missing. The puzzle also exists in other sizes, particularly the smaller 8-puzzle. If the size is 3×3 tiles, the puzzle is called the 8-puzzle or 9-puzzle, and if 4×4 tiles, the puzzle is called the 15-puzzle or 16-puzzle named, respectively, for the number of tiles and the number of spaces. The object of the puzzle is to place the tiles in order by making sliding moves that use the empty space.

wikipedia

Features

  • Nice UI (using ncurses)
  • Move suggestions (solve algorithm implemented)
  • Undo / Redo
  • Supports any board size (needs to be recompiled)

Screenshots

Start

Start

Help

Help

Game

Game

Build

> make

Run

> ./build/15

Game settings

Size of the board and initial shuffle complexity can be configured in game.h:

#define BOARD_SIZE 4
#define SHUFFLE_COUNT 15

Dependencies

ncurses

Mac OS

brew install ncurses

About

15 puzzle game

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published