cpp program that simulates 2048 game and runs on the terminal