Welcome to the 15 Puzzle Command-Line Game repository! This project implements the classic 15 Puzzle game in C++. The game challenges players to rearrange the numbered tiles to form the correct numerical order.
The 15 Puzzle, also known as the "Fifteen Game," is a sliding puzzle where players must move tiles into an empty space, one move at a time, to arrange the tiles in the correct numerical sequence.
- Text-based command-line interface for gameplay.
- Modular code structure for easy expansion and maintenance.
- Smart pointer usage for memory management.
- Basic error handling and exception throwing.
- Basic input handling for tile movement.
- Time tracking using a simple Timer class.
- Victory check to determine when the puzzle is solved.
- Use the keyboard keys
w
,a
,s
, andd
to slide tiles in the up, left, down, and right directions, respectively. - The goal is to arrange the tiles in ascending numerical order, with the empty space at the bottom-right corner.
-
Download 15-Puzzle.exe from releases
-
Run .exe
-
Clone the repository to your local machine
-
Compile it using Visual Studio
-
Run the .exe
NOTE: this game was coded on Windows, console clearing will not work on linux, you have to change this line to clear instead of cls
This project is licensed under the GPL v2 LICENSE.
Enjoy the challenge of solving the 15 Puzzle!