Java version of 2048.