programgames/stargazer/stargazer.xtl

source · imports k: games/stargazer/Sky.xtl

i : Int

value · line 14
i ← f̲irst w̲here '{ j → "Sirius" m̲atch ᵏn̲ame j } e̲ach ᵏp̲ool 0

s : Int

value · line 20
s ← ᵏn̲ew 1

pic : Char

value · line 22
pic ← ⎕S̲HOW ᵏd̲raw s

j : Int

value · line 26
j ← f̲irst ᵏm̲arks s
Used in: t, c

t : Int

value · line 27
t ← s ᵏc̲lick 1 ᵏa̲t j

c : Int

value · line 29
c ← f̲irst w̲here (ᵏo̲ffered t) = j
Used in: b

b : Float

value · line 30
b ← c s̲elect ᵏm̲enu t
Used in: t

t : Int

value · line 31
t ← t ᵏc̲lick ((f̲irst b) + 0.5 × 3 s̲elect b) c̲at (2 s̲elect b) + 0.5 × 4 s̲elect b

pic : Char

value · line 33
pic ← ⎕S̲HOW ᵏd̲raw t

ok : Unit

value · line 39
ok ← "i m_ember? 7 k:c_hoices i" a̲ssert< "a star is among its own choices"
a̲ssert< expands to
({ @ → (i m̲ember? 7 ᵏc̲hoices i) ? @◆ ⎕E̲RR "assertion failed: i m_ember? 7 k:c_hoices i (a star is among its own choices) [games/stargazer/stargazer.xtl:39]"◆ @ } @)

ok : Unit

value · line 40
ok ← "4 = t_ally u_nique 7 k:c_hoices i" a̲ssert< "four different stars to choose from"
a̲ssert< expands to
({ @ → (4 = t̲ally u̲nique 7 ᵏc̲hoices i) ? @◆ ⎕E̲RR "assertion failed: 4 = t_ally u_nique 7 k:c_hoices i (four different stars to choose from) [games/stargazer/stargazer.xtl:40]"◆ @ } @)