flowtore.blogg.se

2048 versions
2048 versions












2048 versions
  1. #2048 versions update#
  2. #2048 versions full#

If the landing position is empty & & there is no obstacle in the middle, update the style, set the value of the landing position grid to the value of the moving grid, and set the value of the original grid to empty. If the value of this grid is not 0, traverse the elements on the right side of the grid to judge whether the position of the foot is empty and whether the number of the foot position is equal to the original number. Taking moving to the right as an example, first judge whether the grid can move to the right. Judge where each grid is moved and whether it will be merged After any two grids are merged, the score shall be added with the value to be the value of the merged gridĦ. When they are satisfied, prompt gameover and end the gameĥ. If there is no space, judge whether all four directions cannot move. If there is space, generate the next block. In the subsequent generation of random numbers, judge whether there is still space. If it cannot be moved, it will not changeĤ. Judge whether it can be moved in a certain direction. The color of the box should change with the change of the valueģ. The box moves and merges the appropriate effect. Initialize the interface and randomly generate two grids with numbers of 2 or 4Ģ. Then we will analyze the functions we need to implement:ġ.

2048 versions

Abiding by these rules can ensure the level of tens of thousands.

2048 versions

This is the experience I share with novice players.

#2048 versions full#

Ensure that the row / column of maximum number and secondary maximum number is full 1.2 basic principles of the gameīe sure to put the largest number of cornersģ. If all 16 squares are filled and the adjacent squares are different, that is, they can’t be moved, Congratulations, gameover. The scores of those big guys are really amazing. There is a score ranking on the mobile phone. The continuous combination will improve the score. After each operation, a 2 or 4 will be randomly generated in the blank square. After two squares with the same number collide together, they are merged into their sum. 1.1 rules of the gameĬontrol all the squares to move in the same direction every time. I believe many people are familiar with the playing method of this game. I’ve basically passed the mobile game 2048.














2048 versions