It is also very early very early: P This is the "Seven Puzzles" I wrote before I wrote "Seven Puzzles", which is a Russian square in the montage home http://sscomic.yeah.net. Implementation, the contact programming is only half a year, I hope I can help beginners. Almost not written, and the post-stage block rotates, and the elimination is only a way to introduce a little method, but it should still be appreciable. This person is scattered, if there is an improper, I also hope that you will teach you. The world world is the game, in the Russian square is MXN small lattice, we can use a group to represent Byte g_Byscene [n] [m] where N is the number of lines, m is the number of rows, the upper left corner (0) We can continue to define #define scene_empty 0 is when g_byscene [y] [x] == 0 Times, you can put it in block, otherwise when block falls (Y 1, X) It is not possible to continue because there are some functions that may be used later, so it is temporarily used to define 0 values. The role role is the place where the player can control, here is a square of 4 small squares. Everyone can exhaust all possible combinations ----------------- **** ----------------- *** **, *** ----------------- ** * **, ** * ----------------- * * ***, ** * ----------------- * * ****, **, **, *** * * * ------ ----------- * ** ****, *, ***, * * * ** ----------------- * * * ****, *, ***, * ** * * ----------------- Everyone also can see it clearly, because you can't use pictures, so you have to use characters. , A total of 7 kinds of squares, including 17 kinds of rotation. These squares can be placed in 4x4 spaces, the map is simple, we can build a 4x4 size array, save the square information, because there are 17 kinds, so you should #define element_num_t_max 17 Byte g_byelement [Element_num_t_max] [4] [4 Each value should be defined when the game is initialized, so we can index the square by square number (0-16) in the game. In order to facilitate the rotation, it is best to put it in the order of clockwise change will be put together, and the order I have is a bit wrong.