2048 is a tile game, you need to use your brain. The game has a board included 4x4 tile, the rule is easy: you have to use arrow keys to move entire tile up, down, left, right to complete the game:
- Each time you move, the number tiles on board will be move to the direction you want and another tile will appear randomly (tile with number 2 or 4) on the empty tiles.
- 2 tiles with the same number on the way you move will be merge together and become 1 number tile with the value is the sum from 2 tiles before.
To win, you have to merge tiles to create the 2048 tile. It sound easy, but it's hard to win. Anyway, I found a strategy to complete the game, that strategy I called it "3 magic directions".
I called it with that name because the method of this strategy is to use only 3 adjacent directions movement to sort the tile (example: up-right-down, or right-down-left), you shouldn't or avoid using the other direction.
This strategy is use to sort the tile by [n,n*2,n*4,n*8] (example: [64,128,256,512] ) of a row or column at the middle direction in 3 adjacent directions.
- If you use left-down-right: then sort the 4th row (the last row at the bottom standing at the DOWN direction - the middle direction in 3 adjacent directions)
- If you use up-right-down: sort the 4th column (the last column on the right - the middle direction in 3 adjacent directions)
Note: Use should only use the other direction if you can't move any more using 3 adjacent directions.
This is my result using up-right-down
Wish you have a fun time with this game. Any problem, feel free to leave comment. Thanks all ^^