That is a much simpler representation, but then again, the problem of rotating it comes in the way. But if i have the  matrix, i can use simple matrix rotations. I've been googling around and found these solutions for the rotation:
c# - How to Rotate a 2D Array of Integers - Stack Overflow
java - Rotate array clockwise - Stack Overflow
I think they would work with the cube.