An implementation of the game 2048 in library format.