The 2048 game write in Java