ludic.jobs jobs_posted_count, ludic.steps steps_my_shares_into - a count and a kept list for what a party asks every tick

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-28 15:12:24 +03:00
parent fc0f3d3790
commit ae5df73e72
4 changed files with 21 additions and 0 deletions

View file

@ -20,6 +20,13 @@ export function jobs_posted(jobs_st: JobsState, b: int) -> []int {
return out
}
# how many of a board's slots hold a post, without the list
export function jobs_posted_count(jobs_st: JobsState, b: int) -> int {
var n = 0
for s in 0 .. jobs_slots(b) { if jobs_post_kind(jobs_st, b, s) >= 0 { n += 1 } }
return n
}
# how many of a board's posts are paid
export function jobs_posts_done(jobs_st: JobsState, b: int) -> int {
var n = 0