Ledrer copy,, on 29 December 2010 - 07:01 AM, said:
this will only make a small shuffle still working on the real solution..
kaiserjoint, on 28 December 2010 - 02:15 AM, said:
Fix it! mostly
there are a few restrictions for all of this...
The fix:
inside 'slidingPuzzleMain.as' in the jumble function there is a piece of code creating a random number.
The problem was the "possibles.length".
I traced this and it gave different numbers each time.
I changed it and now it works great.
var randNum:Number = Math.floor(Math.random() * (possibles.length));
into >>>> var randNum:Number = Math.floor(Math.random() * 1);
The restrictions involving this script.
Pay attention to the amount of moves_to_finish in relation to the amount of tiles you use.
It's spacing out if you use for example: a 3x3 puzzle with a moves_to_finish of 100.
I'd say just keep it realistic.
The fix:
inside 'slidingPuzzleMain.as' in the jumble function there is a piece of code creating a random number.
The problem was the "possibles.length".
I traced this and it gave different numbers each time.
I changed it and now it works great.
var randNum:Number = Math.floor(Math.random() * (possibles.length));
into >>>> var randNum:Number = Math.floor(Math.random() * 1);
The restrictions involving this script.
Pay attention to the amount of moves_to_finish in relation to the amount of tiles you use.
It's spacing out if you use for example: a 3x3 puzzle with a moves_to_finish of 100.
I'd say just keep it realistic.


MultiQuote






|