From ad8243c74c1d718b94a2a4bf4f0fa56d4c9dbb45 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Tue, 6 Feb 2024 13:32:24 -0500 Subject: Randomize sunwarps --- randomizer/randomizer.gd | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'randomizer/randomizer.gd') diff --git a/randomizer/randomizer.gd b/randomizer/randomizer.gd index 681567d..2d26208 100644 --- a/randomizer/randomizer.gd +++ b/randomizer/randomizer.gd @@ -7,6 +7,8 @@ var SCRIPT_steady var generator var steady +var sunwarps + var thread = Thread.new() signal finished_randomizing @@ -29,6 +31,13 @@ func _thread_func(gen_seed): steady = SCRIPT_steady.new() steady.generate(rng) + var iota = range(1, 13) + sunwarps = [] + while not iota.empty(): + var i = rng.randi_range(0, iota.size() - 1) + sunwarps.append(iota[i]) + iota.remove(i) + emit_signal("finished_randomizing") -- cgit 1.4.1