From 810a2745b407f8b3fe3cbe7bb344847b7a5a1cad Mon Sep 17 00:00:00 2001 From: jbzdarkid Date: Sat, 11 Sep 2021 10:40:27 -0700 Subject: Fix a bug where re-randomization could cause inconsistency Closes #8. Co-authored-by: Star Rauchenberger # Conflicts: # App/Version.h # Source/Randomizer.h --- Source/Randomizer.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Source/Randomizer.h') diff --git a/Source/Randomizer.h b/Source/Randomizer.h index bd8895b..a416c98 100644 --- a/Source/Randomizer.h +++ b/Source/Randomizer.h @@ -11,7 +11,7 @@ public: void PreventSnipes(); enum SWAP { - NONE = 0, + // NONE = 0, TARGETS = 1, LINES = 2, AUDIO_NAMES = 4, @@ -36,7 +36,8 @@ private: void RandomizeAudioLogs(); void Randomize(std::vector& panels, int flags); - void RandomizeRange(std::vector &panels, int flags, size_t startIndex, size_t endIndex); + void Shuffle(std::vector&order, size_t startIndex, size_t endIndex); + void RandomizeRange(std::vector panels, int flags, size_t startIndex, size_t endIndex); void SwapPanels(int panel1, int panel2, int flags); void ReassignTargets(const std::vector& panels, const std::vector& order, std::vector targets = {}); void ReassignNames(const std::vector& panels, const std::vector& order); -- cgit 1.4.1