A simple game which takes an image, then slices it into tiles and shuffles.
Go to file
NaiJi ✨ 90ed819f17 Update --help and add README 2021-01-09 00:27:07 +03:00
.gitignore Change qmake to cmake and build sfml statically 2020-12-22 01:06:04 +03:00
CMakeLists.txt Optimize winning condition 2021-01-09 00:14:28 +03:00
README.md Update --help and add README 2021-01-09 00:27:07 +03:00
application.cpp Optimize winning condition 2021-01-09 00:14:28 +03:00
application.h Optimize winning condition 2021-01-09 00:14:28 +03:00
board.cpp Optimize winning condition 2021-01-09 00:14:28 +03:00
board.h Optimize winning condition 2021-01-09 00:14:28 +03:00
filepath_util.h Add -r support 2020-12-20 16:49:24 +03:00
main.cpp Add -r support 2020-12-20 16:49:24 +03:00
output_util.h Update --help and add README 2021-01-09 00:27:07 +03:00

README.md

sliding-puzzle

A simple game which takes an image, then slices it into tiles and shuffles. You need to restore the initial image by swapping neighbor tiles! It's a command line application and does support --help.

How to build

You only need a compiler supporting c++17 and sfml 2.5.1 (or latter versions).

Usage

usage: sliding-puzzle [-OPTIONS...] FILE-OR-DIRECTORY

Provide FILE-OR-DIRECTORY variable as a path to either a directory
which contains images (one will be picked randomly) or a specific
image file of .bmp, .jpg, of .png format.

If no path was provided, it will be assumed as '.'!

Options:
  [-r NUMxNUM] Provide it if you want to explicitly define
               window resolution.
  [-s NUM]     Provide it if you want to explicitly define
               qualifier for image slicing, it's counted
               by the smallest side of given source texture.
               Hence, if your image is square, the amount of tiles
               will be num * num.