Make gameplay closer to Cirulli's

I adapted code from [Mevdschee's C version of 2048](https://github.com/mevdschee/2048.c) in order to make Saming's 2048 play more like Cirulli's version.

Main changes:
* Replace moveGrid() with functions adapted from 2048.c: findTarget(), slideArray(), rotateBoard(), moveUp(), moveDown(), moveLeft(), moveRight() 
* Store empty cells as 0 instead of -1
* Use grid[x][y] instead of grid[y][x]