fifteen icon indicating copy to clipboard operation
fifteen copied to clipboard

can u tell me the suffle logic for 3*3 matrix

Open sagar-kiwi opened this issue 8 years ago • 4 comments

sagar-kiwi avatar Jan 12 '17 14:01 sagar-kiwi

Check this function, maybe it will help you https://github.com/nosovsh/fifteen/blob/master/src/GameHelpers.js#L27

nosovsh avatar Jan 12 '17 14:01 nosovsh

i have tried that .. but puzzle not solved at the end.

sagar-kiwi avatar Jan 12 '17 14:01 sagar-kiwi

Unfortunately I can not check it right know. But I think logic should be the same as for 4x4: number of permutation on shuffling should be even Check this for formal explanation http://mathworld.wolfram.com/15Puzzle.html

nosovsh avatar Jan 12 '17 15:01 nosovsh

i have used ur code ....but the puzzle solved randomly in 3*3 matrix.

There is no any suggestion for 8 puzzle in your given link

sagar-kiwi avatar Jan 13 '17 07:01 sagar-kiwi