2048 implemented in c