Path: utzoo!attcan!uunet!cs.utexas.edu!wuarchive!decwrl!ucbvax!hplabs!hp-ses!hp-ptp!nigel From: nigel@hp-ptp.HP.COM (Nigel_Clunes) Newsgroups: comp.graphics Subject: Re: Rubiks Cube Message-ID: <1580004@hp-ptp.HP.COM> Date: 19 Dec 89 02:40:18 GMT References: <4382.256d6784@uwovax.uwo.ca> Organization: HP Pacific Technology Park - Sunnyvale, Ca. Lines: 29 If solving the cube is the purpose of the exercise, then my suggestion below is of no used. However if the purpose of the exercise is the graphics, then do it the easy way as follows. 1. Start with a "solved cube". 2. Make a random move on the cube. 3. Push the move onto a stack. 4. Repeat steps 2 and 3 the desired number of times. 5. Display the current state of the cube. 6. Now pop a move off the stack and reverse the move on the cube. 7. Display the cube in its new state. 8. Repeat steps 6 and 7 until the stack is empty. 9. Done. Another way is to save the state of the cube on the stack as each random move it made. Then simply pop each cube state off the stack and display it. Gook Luck with the project. If you get it working, please post a copy into one of the source groups.