summary refs log tree commit diff stats
path: root/randomizer/randomizer.gd
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2024-02-06 13:32:24 -0500
committerStar Rauchenberger <fefferburbia@gmail.com>2024-02-06 13:32:24 -0500
commitad8243c74c1d718b94a2a4bf4f0fa56d4c9dbb45 (patch)
treeca03e7a2f780e38cdcc338308d329a6dc279e35a /randomizer/randomizer.gd
parent6e04dbb1ebb811429bbfdb53bd8c4c079ef63732 (diff)
downloadlingo-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.gd9
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
8var generator 8var generator
9var steady 9var steady
10var sunwarps
11
10var thread = Thread.new() 12var thread = Thread.new()
11 13
12signal finished_randomizing 14signal 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