Jump to content

Recommended Posts

Posted (edited)

just doin this for fun.  Its my version of a virtual rubix cube and I plan to just make a cout type  display that shows all the sides in a fold out type way.  Then i plan to write functions to rotate it around and maybe one day solve it or have it figure out how to solve itself and or put in the ability to enter in information about your own cube and have it tell you how to solve it.  

I've just been playing with a rubix cube lately and figured this would be a good challenge.

I just started working on it this evening and its coming along.  Maybe even use autoit to actually draw the cube at some point or us the the c++ as a dll and build an autoit gui to control it or something.  I realize this has all been done b4 but like i said its just for fun.  Just a challenge.

 

edit.  I found a typo or 2 and the one if statement was all backwards.  i was going to use it in the while statement but just decided to use it in an if and just break but i forgot to switch the logic around.

 

  Reveal hidden contents

 

Edited by markyrocks
Posted (edited)

I've come to the conclusion that the above code is some crap.  Lol.  It's just overly complicated and unnecessary.  

After thoroughly thinking about what I'm trying to do and talking to some folks on the c++ forum I could probably get to the same point in the program with like 50 lines of code instead of 500.   It's just growing pains.  No biggie.   It's all for lols anyways.   

 

Edit edit.  What i just put in the spoiler section below will make a random cube and cout what is in the cube and its right around 500 lines. Doh!! i just realized it only outputs 5 sides..... der

  Reveal hidden contents

 

 

cube.png

Edited by markyrocks
update
  • 2 weeks later...
Posted

So i Figured i'd update this not that anyone seems that interested.  I'll be the first to admit that this program does have some unnecessary bloat but hindsight is always 2020.  I just figured i'd share this.  This rubix cube simulator actually works surprisingly well at this point.  I've Implemented just about every movement imaginable.  even against the protests of other people i spoke to about this.  I included the ability to move the center around and rotate the entire cube 360 degrees and even flipping it upside down.  I included the basic algorithms to solve the cube.  I've solved it a few times now and it usually takes me between 10 to 20 min to solve using the algorithms. But ya as far as i can tell it operates exactly like a real cube.  

So if you want to copy this into your version of visual studio.  Have a go at it.

  Reveal hidden contents

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...