Re-create of the game 2048 using Javascript