blob: 84b2fd6609a757635b5b69fa471244993253d8f6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# Picture puzzle
<img src="puzzle.png" />
A desktop game similar to the standard widget in windows 7. The game is written
in C++ (including C++17 standard). FLTK was used as a graphics library. This
library is not as heavy as Qt, and allows to quickly create an application with
graphical widgets.
The essence of the game should be clear: to collect the image in its original
form, moving one puzzle per move.
The application has the following features:
- *upload your image in any format and resolution. The program itself will
resize, cut into puzzles, create the appropriate directory and save them in
it.*
- *showing the complete solution of the puzzle using the optimization algorithm
A\*.*
- *the game is distributed in a single executable file by embedding the original
standard image (toucan image) in the executable file. The image data is stored
in an array in an object file (resources.o)*
- *support for \*unix and Windows platforms*
## Building
Unfortunately, for \*nix platforms, you need to install the FLTK library because
the executable file will require a dynamic library. For example, for
distribution Ubuntu, this can be done as follows:
```
$ sudo apt install fltk1.3-dev
```
Next, simply download the source files via git and compile the project using
utility Make:
```
git clone https://git.scratko.xyz/picture-puzzle
cd picture-puzzle
make
./main
```
## For Windows platform
The built executable file (under x86_64) is available at the link: <a
href="https://scratko.xyz/games/puzzle.exe" target="_blank">Download Windows
version</a>
|