Skeleton for 2048 (credit to Gabriele Cirulli)