Graundation

About Graundation

granundation concept

Graundation Description

A key tenet of programming anything is knowing what the rules are - knowing exactly how your program should behave in a given set of circumstances. A vague idea won't cut it: we need specifics and exactitude, free of any semblance of ambiguity. With that in mind, let's consider how the game of 2048 works. we start with a 4x4 grid which has some 2s and some 4s on it random locations. Initially two tiles are populated. The player can make one of four moves, shifting the tiles up, down, left or right. Suppose the player chooses left, then the following algorithm applies: For every row start by moving all the numbered tiles left so that any empty tiles are on the right of the row. Now we will look at each tile's situation and decide how the tiles will change. Starting with the tile on the left, if the tile to its right has the same value then left-most of the pair will double in value, the rightmost of the pair will vanish, and all tiles to the right will move one position left. Repeat this process for the second and the third tiles from the left. Repeat the whole process for the second, third and fourth rows. if there is still space then another 2 or 4 tile is added randomly in one of the available empty spaces. if no move is possible after this then it's Game over. For other directions, the same algorithm applies with strategic substitution of row with column and right with left, up or down.

More about Graundation

Graundation is located at 11 Headcorn Road, BR1 4SQ London, United Kingdom
07459622823
https://www.MINDSPARKNET.com