Rules
The arithmetic of **Helsinki Life**, as pure functions of a player record and the board in `game.core.HL`. No entities, no timing, no events - so a payday, a tuition bill or the final ranking can be checked without running a turn.
Rules
The arithmetic of Helsinki Life, as pure functions of a player record and
the board in game.core.HL. No entities, no timing, no events - so a payday, a
tuition bill or the final ranking can be checked without running a turn.
local Rules = require("game.rules.Rules")
Rules.paydayFor(player) -- { gross, costs, net }
Rules.paydayLine(player) -- the line the log prints
Rules.childrenFromSpin(7) -- 2
Rules.previewPath(1, 9) -- { 2, 3, 4, 5, 6 } - it stops at the career tile
Rules.retirementFor(player) -- pension + what the home fetched
Rules.ranking(state) -- ordered rows; each is the player's own record
-- plus place, score, total, order and player
The economy
Rules.ECON holds every number the turn engine spends. A life on this board is
about six paydays long, so a salary is a season's worth of money rather than a
month's, and onni is deliberately expensive (HL.SCORING.onniValue = €10 000 a
point): a warm poor life beats a cold rich one, which is the argument of the
game.
| Field | What it is |
|---|---|
allowance | A payday with no career yet |
childCost | Per child, off every later payday |
tuition | Charged on entering each Kumpula study tile |
graduationBonus | Paid on top of the payday at Graduation |
weddingGift | × the guests' spin at the Cathedral |
weddingOnni, childOnni, noChildOnni | What the milestones are worth |
homeResaleRate | What a home fetches when the deck's home names no resale |
retirementBonus | The pension, on arrival at Suomenlinna |
spinMin, spinMax | The wheel |
Salaries, prices and card values are the deck's numbers, not these; these are what the board charges whoever is standing on it.
previewPath
The walk is taken a tile at a time, because the fork at Pasila asks the player
which way. previewPath is the honest preview the moveStart event carries: it
runs out at a STOP-kind tile, at the fork, or at the end of the line, whichever
comes first.
Scoped to this part · feeds back into the world's score.