-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathutils.ink
60 lines (53 loc) · 1.16 KB
/
utils.ink
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
=== function get_random_index ===
~ temp length = LIST_COUNT(LIST_ALL(names))
~ temp x = RANDOM(1, length)
~ return x
=== function get_random_answer ===
{shuffle:
- ~ return "A"
- ~ return "B"
- ~ return "C"
- ~ return "D"
- ~ return "E"
}
=== function get_writing_instrument ===
{shuffle:
- ~ return "blue pen"
- ~ return "pencil"
- ~ return "red pen"
- ~ return "black pen"
}
== function get_writing_instrument_alternative(current) ===
~ temp instrument = get_writing_instrument()
{instrument == current:
~ return get_writing_instrument_alternative(current)
- else:
~ return instrument
}
=== function get_color ===
{shuffle:
- ~ return "green"
- ~ return "red"
- ~ return "yellow"
- ~ return "black"
- ~ return "purple"
}
=== function get_alternate_color ===
{not wearing_hat:
- ~ return get_color()
}
{wearing_hat:
~ temp color = get_color()
{color == hat_color:
~ return get_alternate_color()
- else:
~ return color
}
}
=== function set_universe ===
~ temp x = RANDOM(1, 4)
{x == 1:
~ return "original"
- else:
~ return "fake"
}