try to implement 2048 on javascript.