librarylib/State.xtl
State: changing items of a game's state vector, shared by the games.
ˡu̲pdate : Int -> Int -> Int
Several items of s changed at once: iv is index, value, index, value, ... A table of every position against every index says which items change; the values spread across it say to what.
ˢ⁼u̲se< "State"
10 20 30 40 50 ˢu̲pdate 2 0 5 9 10 0 30 40 9
ˡu̲pdate ← { s iv → k ← (t̲ally iv) d̲iv 2 m ← (r̲ange t̲ally s) '= t̲able ((2 × r̲ange k) − 1) s̲elect iv v ← ((t̲ally s) c̲at k) r̲eshape (2 × r̲ange k) s̲elect iv (s × n̲ot '∨ r̲/₂ m) + '+ r̲/₂ m × v }