;Task:
Implement a 2D sliding block puzzle game where blocks with numbers are combined to add their values.


;Rules of the game:
:* &nbsp; The rules are that on each turn the player must choose a direction &nbsp; (up, down, left or right).
:* &nbsp; All tiles move as far as possible in that direction, some move more than others. 
:* &nbsp; Two adjacent tiles (in that direction only) with matching numbers combine into one bearing the sum of those numbers. 
:* &nbsp; A move is valid when at least one tile can be moved, &nbsp; if only by combination. 
:* &nbsp; A new tile with the value of &nbsp; '''2''' &nbsp; is spawned at the end of each turn at a randomly chosen empty square &nbsp; (if there is one). 
:* &nbsp; Adding a new tile on a blank space. &nbsp; Most of the time, &nbsp; a new &nbsp; '''2''' &nbsp; is to be added, &nbsp; and occasionally &nbsp; ('''10%''' of the time), &nbsp; a &nbsp; '''4'''.
:* &nbsp; To win, &nbsp; the player must create a tile with the number &nbsp; '''2048'''. 
:* &nbsp; The player loses if no valid moves are possible.


The name comes from the popular open-source implementation of this game mechanic, [https://gabrielecirulli.github.io/2048/ 2048].


;Requirements:
* &nbsp; "Non-greedy" movement. &nbsp; <br>&nbsp; The tiles that were created by combining other tiles should not be combined again during the same turn (move). &nbsp; <br>&nbsp; That is to say, &nbsp; that moving the tile row of:

               <big><big> [2][2][2][2] </big></big>

:: to the right should result in: 

               <big><big> ......[4][4] </big></big>

:: and not:

               <big><big> .........[8] </big></big>

* &nbsp; "Move direction priority". &nbsp; <br>&nbsp; If more than one variant of combining is possible, &nbsp; move direction shall indicate which combination will take effect. <br>&nbsp; For example, moving the tile row of:

               <big><big> ...[2][2][2] </big></big>

:: to the right should result in:

               <big><big> ......[2][4] </big></big>

:: and not:

               <big><big> ......[4][2] </big></big>



* &nbsp; Check for valid moves. &nbsp; The player shouldn't be able to skip their turn by trying a move that doesn't change the board.
* &nbsp; Check for a &nbsp;win condition.
* &nbsp; Check for a lose condition.
<br><br>

