Etotheipi
Member
I've been working on a little Python cube simulator type thing, partially just to learn Python better and partially to have a way to mess around with AI, alg genning and whatnot. So I made this thread for me to get help cause I'm a python newbie, and for people to suggest ideas for me to implement. I'm having a little trouble with getting the moves to work. The way I have it coded is I gave every position a 'sticker' could go a number 1-54, and then I have a list with 54 elements with the first letter of the color of the sticker in that space. So, if there was a blue sticker in position 34, then the 34th element of the list would be "b". Then the way I do moves on the cube is I made a Move class, which takes two lists as parameters. The first list has the numbers of all the stickers that will be moved, and the second list has the numbers of the places that the stickers will be moved to. So if you did:
move=Move([1,39],[39,1])
apply_move(move)
Then it should swap the stickers 1 and 39. But it doesn't seem to be working (The sticker at 1 is moved to position 39, but not the sticker at position 39 to 1). I can post my full code if needed.
move=Move([1,39],[39,1])
apply_move(move)
Then it should swap the stickers 1 and 39. But it doesn't seem to be working (The sticker at 1 is moved to position 39, but not the sticker at position 39 to 1). I can post my full code if needed.
Last edited: