From 07a6c35470cebb80c076a41c05ab40df200d95c1 Mon Sep 17 00:00:00 2001 From: Orkuncakilkaya Date: Mon, 28 Sep 2026 15:59:41 +0300 Subject: [PATCH] ludic.things: things_reserve sizes the rows, grid, kind index and uid map (tb_reserve, imap_reserve) Co-Authored-By: Claude Opus 5.5 --- packages/ludic.things/spare.ludic | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/ludic.things/spare.ludic b/packages/ludic.things/spare.ludic index a1c010b6..9b46fc1a 100644 --- a/packages/ludic.things/spare.ludic +++ b/packages/ludic.things/spare.ludic @@ -50,9 +50,12 @@ function th_clean(t: Thing) -> Thing { return t } -# room for `n` Things in the grid before it has to grow: a world that will place more in play -# than it placed at the start sizes it once, at the start -export function things_reserve(things_st: mut ThingsState, n: int) -> void { grid_reserve(things_st.th.grid, n) } +# room for `n` Things (rows, grid, kind index, uid map) before any grows: a world that will place +# more in play than it placed at the start sizes it once, at the start +export function things_reserve(things_st: mut ThingsState, n: int) -> void { + tb_reserve(things_st.th.tab, n) + imap_reserve(things_st.th_uids, n) +} export function things_spare_count(things_st: ThingsState) -> int { return len(things_st.th_spare) - things_st.th_spare_at }