Implementation of 2048 game.