diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2024-02-06 13:32:24 -0500 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2024-02-06 13:32:24 -0500 |
commit | ad8243c74c1d718b94a2a4bf4f0fa56d4c9dbb45 (patch) | |
tree | ca03e7a2f780e38cdcc338308d329a6dc279e35a /randomizer/randomizer.gd | |
parent | 6e04dbb1ebb811429bbfdb53bd8c4c079ef63732 (diff) | |
download | lingo-randomizer-rewrite.tar.gz lingo-randomizer-rewrite.tar.bz2 lingo-randomizer-rewrite.zip |
Randomize sunwarps rewrite
Diffstat (limited to 'randomizer/randomizer.gd')
-rw-r--r-- | randomizer/randomizer.gd | 9 |
1 files changed, 9 insertions, 0 deletions
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 | |||
7 | 7 | ||
8 | var generator | 8 | var generator |
9 | var steady | 9 | var steady |
10 | var sunwarps | ||
11 | |||
10 | var thread = Thread.new() | 12 | var thread = Thread.new() |
11 | 13 | ||
12 | signal finished_randomizing | 14 | signal finished_randomizing |
@@ -29,6 +31,13 @@ func _thread_func(gen_seed): | |||
29 | steady = SCRIPT_steady.new() | 31 | steady = SCRIPT_steady.new() |
30 | steady.generate(rng) | 32 | steady.generate(rng) |
31 | 33 | ||
34 | var iota = range(1, 13) | ||
35 | sunwarps = [] | ||
36 | while not iota.empty(): | ||
37 | var i = rng.randi_range(0, iota.size() - 1) | ||
38 | sunwarps.append(iota[i]) | ||
39 | iota.remove(i) | ||
40 | |||
32 | emit_signal("finished_randomizing") | 41 | emit_signal("finished_randomizing") |
33 | 42 | ||
34 | 43 | ||