Clone of 2048 in Java