Adapted from the popular 2048 game created by Gabriele Cirulli