Java implamentation of 2048