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>
12 lines
348 B
Text
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
|
|
}
|