ludic/examples/modules/station/app/index.ludic
Orkuncakilkaya 19fcf60599 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>
2026-09-25 15:31:34 +03:00

12 lines
348 B
Text

# app/index.ludic - the app puts the program together: it sees the port and fills it
module app uses clock
bind Clock { now: fn game_hours }
export state AppState {
g_hours: int = 30
}
function game_hours(app_st: AppState) -> int {
return app_st.g_hours
}
export function advance(app_st: mut AppState, h: int) -> void {
app_st.g_hours += h
}