During the maintenance of the blog, and collect information on the subject of Qt is a continuous interaction with the readers, who are trained on the examples on this site. But at the same time any reader can also make a small contribution to the development of information on Qt in RuNet.
Therefore, I present to your attention is the work of Ilya Dydyshko - game "Fifteen", written using the Qt libraries. After a brief consultation with my hand, Ilya went missing for a while. After writing a workable version of the game, Ilya has shared his work with Evileg project. The site spread workable, but not the final version of the draft, since the author is planning doshlifovat all sharp corners in the code.
Game Description algorithm that was applied in this project can be seen at the following resources .
This example of writing the game, "Fifteen" offers to collect the image Gelendvagen. The game menu is implemented with the launch of the game, description, item help and a button release.
When you press "Start" button, you start the game.
In this menu window disappears, and there is only a window to the game board. In this case, there is a possibility, how to create a new game again, and out of the current game back to the menu.
In the case of a successful build pictures Game announces the victory.
In this example, a picture prepared in advance, and is divided into 15 parts. Each piece is shown on a separate button. When you click on one of the buttons, which is next to an empty area, the movement of the button is in an empty area. If there is no empty area next to the button nothing happens.
Management also implemented using the keyboard arrows and space bar. By pressing the space bar is similar to the movement of pieces of the picture, as is the case with the click of a mouse.
Author of the project: Ilya Dydyshko