0

Does anybody have any idea on how to model a rubix cube in an array? I can't seem to think of a way?

Andrew delgadillo
  • 714
  • 6
  • 13
  • 24

2 Answers2

3

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.

Brandon Frohbieter
  • 17,563
  • 3
  • 40
  • 62
2

I wouldn't try a 1 dimensional array. But you could have a 3 dimensional array.

And array of 3x3 arrays of each side.

thomasfedb
  • 5,990
  • 2
  • 37
  • 65