wip(0.S3): packages and examples migrated in one run - ludic migrate state packages <every example program> packages/ludic.lab/example/plate.ludic
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
d490d4f9f1
commit
3eda72e8c2
172 changed files with 3094 additions and 2966 deletions
|
|
@ -1,10 +1,12 @@
|
|||
# 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 }
|
||||
var g_hours: int = 30
|
||||
function game_hours() -> int {
|
||||
return g_hours
|
||||
export state AppState {
|
||||
g_hours: int = 30
|
||||
}
|
||||
export function advance(h: int) -> void {
|
||||
g_hours += h
|
||||
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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue