wip(0.S3): packages and examples migrated again from their pre-0.S sources in one run

ludic migrate state packages <every example program> packages/ludic.lab/example/plate.ludic
  1804 vars into 126 states, 64 into lets; 23498 edits in 460 files

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-25 15:31:34 +03:00
parent 5ffe50ed02
commit 19fcf60599
459 changed files with 17862 additions and 17603 deletions

View file

@ -1,27 +1,27 @@
# each.ludic - a step every player must meet in their own pack: how many seats are taken, how
# many of them carry it, and which do not
export function steps_players() -> int {
export function steps_players(steps_st: StepsState) -> int {
var n = 0
for p in 0 .. steps__players { if StepsWorld.present(p) { n += 1 } }
for p in 0 .. steps_st.steps__players { if StepsWorld.present(p) { n += 1 } }
return n
}
# how many seats taken have step i's thing (seat 0 counted live)
export function steps_each(i: int) -> int {
steps__cols()
export function steps_each(steps_st: mut StepsState, i: int) -> int {
steps__cols(steps_st)
var n = 0
for p in 0 .. steps__players {
if StepsWorld.present(p) and steps__col[p * STEPS_PER_CHAPTER + i] != 0 { n += 1 }
for p in 0 .. steps_st.steps__players {
if StepsWorld.present(p) and steps_st.steps__col[p * STEPS_PER_CHAPTER + i] != 0 { n += 1 }
}
return n
}
# the seats that do not have it yet
export function steps_lacking(i: int) -> []int {
steps__cols()
export function steps_lacking(steps_st: mut StepsState, i: int) -> []int {
steps__cols(steps_st)
let out = new []int
for p in 0 .. steps__players {
if StepsWorld.present(p) and steps__col[p * STEPS_PER_CHAPTER + i] == 0 { push(out, p) }
for p in 0 .. steps_st.steps__players {
if StepsWorld.present(p) and steps_st.steps__col[p * STEPS_PER_CHAPTER + i] == 0 { push(out, p) }
}
return out
}