Giter VIP home page Giter VIP logo

15-puzzle-cli's Introduction

๐Ÿงฉ 15-Puzzle-cli

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.

Screenshot 2023-08-23 180209

๐Ÿ“” Table of Contents

โ„น๏ธ Introduction

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.

๐Ÿ“‘ Features

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

๐Ÿ•น๏ธ How to Play

  • Use the keyboard keys w, a, s, and d 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.

๐ŸŽฏ Downloading the game

  1. Download 15-Puzzle.exe from releases

  2. Run .exe

๐Ÿ–ฅ๏ธ Compiling from source

  1. Clone the repository to your local machine

  2. Compile it using Visual Studio

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

๐Ÿ“œ License

This project is licensed under the GPL v2 LICENSE.

Enjoy the challenge of solving the 15 Puzzle!

15-puzzle-cli's People

Contributors

edveika avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.