rubiks-cube

How would you represent a Rubik's Cube in code?

If you were developing software to solve a Rubik's Cube, how would you represent the cube? ...

Easiest to code algorithm for Rubik's cube?

Edit: I should rephrase this, what would be a relatively easy algorithm to code in Java for solving a Rubik's cube. Efficiency is also important but a secondary consideration. Orig: What is the easiest algorithm to code for solving a Rubik's cube? It could be the least efficient but I am looking for something easy to code right now. ...

cocoa touch: rand() returning the same string

Here's my code: -(void)randommoves { NSArray *possiblemoves =[NSArray arrayWithObjects:@"R ",@"R' ",@"L ",@"L' ",@"B ",@"B' ",@"F ",@"F' ",@"U ",@"U' ",@"D ",@"D' ", nil]; NSMutableString *finalmoves = [[NSMutableString alloc] init]; finalmoves = [NSMutableString stringWithCapacity:0]; [finalmoves retain]; int i = 0; for (i=0; i<20; i...

How to fix rotations in a Rubik's Cube?

I'm trying to create a Rubik's Cube in Flash & Papervision and i'm really stuck here. I'm up to the point where i can rotate any plane of cubes once, but after that...it's messed up because all local coordinate systems are messy. I dont really know where to go from here, can anybody give any advice on what do do? I'm not looking for 're...

Hide Rubik's Cube Internal Wirings

In the context of a Java/OpenGL application I am drawing a black wired only (without filling) big cube composed of 27 smaller cubes. To do that I wrote the following code: for (int x = 1; x <= 3; x++) { for (int y = 1; y <= 3; y++) { for (int z = 1; z <= 3; z++) { wireCube(x - 2, 2 - y, 2 - z); } } }...

Rubik's Cube iphone Application

Hello Everyone, I am working on Rubik's Cube iphone application. But i am stuck in the middle of the development. I am using SIO2 Gaming Engine for the development. Can anyone please provide some sample source code for Rubik's Cube iphone application. Thanks & Regards Tariq ...

Rubik's Cube OpenGL Implementation

What is the "easiest" solution to code a Rubik's Cube with the following features in Opengl: "Camera" moves to let user see the cube from any point of view Smooth display of cube moves in response to user clicks when playing I started with a solution drawing the cube "Face by Face" but I am not sure it's a good solution (I am facing ...