Java version of the gem puzzle game