Implementation of 2048 in c and ncurses