Implemented the game logic for 2048. Academic project.