# Another 2048, now triangular

Our club already had a description of the game 2048 . I admit, the first time I did not like the game. However, after reading the next article, with the tip of the game strategy , everything changed. I confidently installed the 2048 application on my phone and played several times. Having given birth to block 8192 in a couple of hours, I yearned for and demolished the game, deciding to make my own version. Option 1) not boring and 2) for stupid.

Judging by the reviews of friends and personal experience, the goal was achieved. To my friends, my version seemed 1) not boring, but for me - 2) just right.

Urgent to the room . The review team has just approved the game . As promised, I declare it free from this minute for three days, and there it will take out like a curve of the American dream.
.

#### Reduced the number of cells to 10

Indeed, with a large number of cells, the game becomes monotonous. With 10 cells - on the contrary, the game round lasts no more than 5 minutes, a time comparable to serving one person from the queue at Sberbank. On 10 cells, the master can create block 2048.

#### Changed the topology to triangular

A board from a rectangular turned into a triangular. Blocks became hexagons. This added combinations and opportunities to get out of the trap, which arc4random ()% nxy sometimes throws up;
On a triangular board, shifts are made not in four directions, as in the case of a classical square, but already in 6 directions. More freedom, which we sometimes lack.
On the way to create a new board, I went through three or four hex options. The triangle turned out to be the most hit. The rhombus is long, the asterisk is an islet, the triangle of 6 cells is rustic.

#### Last chance

If there are several empty cells on the board, I accidentally throw a block with 2.
If there is only one empty square left on the board, I throw a 2-k into it, only if there are no 4-k among the neighbors. Otherwise - 4-ku. Confusedly explained. In other words - if there is only one cell left ... Damn, I can’t formulate it. Well, under this condition, the master can indeed create block 2048.

#### Small bonus

I add a small bonus to the game points in the event of the simultaneous collapse of several blocks.
If 4 blocks collapse, instead of two, I add 2 bonus points to the player.
If 6 blocks collapse in one move, I add 8 bonus points to the player.
If 8 blocks collapse at the same time (which is theoretically possible), I add 16 to the player! premium points.

#### Build algorithm

The game reminds me of assembling the Rubik's Cube in layers. Like a bow. We giants love onions.
First you collect the top layer - you hold the thickest block on it, then the second and so on.

Based on the principle of layers, I wrote a bot.
Here is a small, slightly simple video for 1 minute as the bot makes block 2048.

Honestly, the bot collects block 2048 in only one case out of ten. To shoot the video, I predefined the random number generator in a convenient value for the bot. Otherwise, the movie would never have been shot.

#### Difficulties of approval in an apple deli

Unfortunately, when testing the application in the Apple appstore, I suffered a little from my own tricks. Initially, the game I wanted to call Trio 2048.
The etymology of such a name is obvious.
But, looking at the name of the application, I suddenly decided to throw away the letter T and reduce the age. Women and programmers are excusable.
It turned out Rio 2014 - which corresponds to the upcoming football event. Feel CEO cunning and insidious intent?
However, the trick failed. I got (amazing!) A football fan from the review team, and he ordered me to change the name. In other words, I’ll freeze accounts in an American bank. I had to rename it to Rio 2048 and wait for the next verdict.

On the day of publication permission ... I hope this day comes. The game will be free and without ads, especially for members of our club.

Fasting during fasting has added value, don’t you? Indeed, while it generates, not to sin ...

.