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:
Orkun ÇAKILKAYA 2026-09-25 15:02:45 +03:00
parent d490d4f9f1
commit 3eda72e8c2
172 changed files with 3094 additions and 2966 deletions

View file

@ -1,10 +1,12 @@
# shop/index.ludic - private names a neighbour also uses: seed, dice, LIMIT
module shop
var dice: int = 100
export state ShopState {
dice: int = 100
}
const LIMIT: int = 5
function seed() -> int {
return dice + LIMIT
function seed(shop_st: ShopState) -> int {
return shop_st.dice + LIMIT
}
export function shop_seed() -> int {
return seed()
export function shop_seed(shop_st: ShopState) -> int {
return seed(shop_st)
}

View file

@ -1,13 +1,15 @@
# weather/index.ludic - the same private spellings, its own; a local named dice is its own too
module weather
var dice: int = 20
export state WeatherState {
dice: int = 20
}
const LIMIT: int = 2
function seed() -> int {
return dice * LIMIT
function seed(weather_st: WeatherState) -> int {
return weather_st.dice * LIMIT
}
function roll(dice: int) -> int {
return dice + 1
}
export function weather_seed() -> int {
return seed() + roll(0)
export function weather_seed(weather_st: WeatherState) -> int {
return seed(weather_st) + roll(0)
}