Model a Rubix Cube in an Array Java
Does anybody have any idea on how to model a rubix cube in an array? I can't seem to think开发者_如何学C of a way?
The source code for this one is available:
http://software.rubikscube.info/AnimCube/
Your in luck, it's Java. :)
This paper shows different ways to model the cube -
http://portal.acm.org/citation.cfm?id=801107&coll=portal&dl=ACM
and another exploratory paper...
http://www.chilton.com/~jimw/rubik.html
but a simple answer would be a 3x3x3 array with 3 digits.
I wouldn't try a 1 dimensional array. But you could have a 3 dimensional array.
And array of 3x3 arrays of each side.
精彩评论