Update --help and add README
This commit is contained in:
parent
37485820a4
commit
90ed819f17
|
@ -0,0 +1,23 @@
|
|||
# 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.
|
|
@ -8,15 +8,18 @@ namespace output
|
|||
|
||||
const char* NO_ARG_MSG = "Please at least provide a path to a target image. --help for more information.\n";
|
||||
const char* HELP_MSG = "usage: sliding-puzzle [-OPTIONS...] FILE-OR-DIRECTORY\n\n"
|
||||
" Necessarily provide the latter variable as path to either a directory\n"
|
||||
" which contains arts (one will be picked randomly) or a specific\n"
|
||||
" image file of .bmp, .dds, .jpg, .png, .tga, or .psd format.\n\n"
|
||||
" Provide FILE-OR-DIRECTORY variable as a path to either a directory\n"
|
||||
" which contains images (one will be picked randomly) or a specific\n"
|
||||
" image file of .bmp, .jpg, of .png format.\n\n"
|
||||
" If no path was provided, it will be assumed as \'.\'!\n\n"
|
||||
" Options:\n"
|
||||
" [-s num] Provide it if you want to explicitly define\n"
|
||||
" qualifier for image slicing, it's counted\n"
|
||||
" by the smallest side of given source texture.\n"
|
||||
" Hence, if your image is square, the amount of tiles\n"
|
||||
" will be num * num.\n";
|
||||
" [-r NUMxNUM] Provide it if you want to explicitly define\n"
|
||||
" window resolution.\n"
|
||||
" [-s NUM] Provide it if you want to explicitly define\n"
|
||||
" qualifier for image slicing, it's counted\n"
|
||||
" by the smallest side of given source texture.\n"
|
||||
" Hence, if your image is square, the amount of tiles\n"
|
||||
" will be num * num.\n";
|
||||
const char* SPLITTING_MSG = "-s should be given with a positive num >= 2 as in [-s num].\n";
|
||||
const char* IMG_FAIL_MSG = "Couldn't load image from given path.\n";
|
||||
const char* RESOLUTION_MSG = "Couldn't recognize given screen resolution.\n"
|
||||
|
|
Loading…
Reference in New Issue