properly shuffle pieces

This commit is contained in:
2022-07-09 03:07:55 +00:00
parent 8ab22392b8
commit 1a078fdbe5

View File

@@ -114,9 +114,10 @@
(+= i 1)))) (+= i 1))))
(r.shuffle startingPoints) (r.shuffle startingPoints)
(set jigsaw j) (set jigsaw j)
(r.shuffle jigsaw.jigs)
(doFor i (range (min TOTAL_PIECES (- p currentRewardFile.startingPoints))) (doFor i (range (min TOTAL_PIECES (- p currentRewardFile.startingPoints)))
(let [jig (nth jigsaw.jigs i) (let [jig (nth jigsaw.jigs i)
pos (ifLet [point ~(dictGet (the Map<Int,FlxPoint> save.data.storedPositions) i)] pos (ifLet [point (dictGet (the Map<Int,FlxPoint> save.data.storedPositions) i)]
point point
(nth startingPoints i)) (nth startingPoints i))
s (new FlxExtendedSprite pos.x pos.y) s (new FlxExtendedSprite pos.x pos.y)