SleelaDoc API
HTML documentation for the SLeeLa standard library (/lib)
Home › Packages › gameplay

Package gameplay

This package contains 14 source unit(s) defining 14 class(es) / struct(s). Each unit below lists its fields (the values it stores) and methods (the actions it performs), with a plain explanation of each.

AskForHelpMove #sleela 2.5 (lib/gameplay/AskForHelpMove.sleela)

AskForHelpMove class extends GameMove

Move (b) — ask for help or new routes. A straight 50/50. Win the flip and the Inference Engine lets you LOOK at your Expected Future as it is being modeled, so you can see whether you are on schedule in your own custom game. Lose the flip and your Boss instead hands you a Detailed Report with some Game-Engineering moves already decided — and you pay for that information based on the Quality of your Person/Citizen. A concrete GameMove: override resolve() to flip, then either read the future or buy the report. The future it modeled and the report it bought are stashed on the move so the turn can show them. Family: gameplay.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
BASE_REPORT_COSTstatic final int BASE_REPORT_COST = 2000cents, before quality scaling
lastFutureExpectedFuture lastFuturepopulated on a winning flip
lastReportDetailedReport lastReportpopulated on a losing flip

Methods — the actions this unit can perform.

MethodSignatureWhat it does
setUpvoid setUp()No description in source.
resolveMoveOutcome resolve(Player p)No description in source.
futureExpectedFuture future()No description in source.
reportDetailedReport report()No description in source.

DetailedReport #sleela 2.5 (lib/gameplay/DetailedReport.sleela)

DetailedReport class

Defines DetailedReport, the document the Boss hands a Player on a LOSING "ask for help" roll — the consolation prize that is often the better prize. Where ExpectedFuture only shows the schedule, a DetailedReport comes with some Game-Engineering moves ALREADY decided, so the player gets a plan instead of a prophecy. The player pays for it based on their own quality. DetailedReport is a NATURAL / LOADABLE MODULE sharing the common module contract (load / loaded / moduleName / describe). It holds an ordered list of pre-decided engineering moves and the price that was charged for it. Family: gameplay.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
MODULEstatic final String MODULE = "DetailedReport"No description in source.
MAX_MOVESstatic final int MAX_MOVES = 16No description in source.
loadedFlagint loadedFlagNo description in source.
titleString titleNo description in source.
decidedMovesString[] decidedMovesGame-Engineering moves the boss already chose
moveCountint moveCountNo description in source.
pricePaidCentsint pricePaidCentswhat the player paid, by their quality
affordableboolean affordablewhether the player could pay at all

Methods — the actions this unit can perform.

MethodSignatureWhat it does
loadvoid load()--- loadable-module contract ------------------------------------------
loadedboolean loaded()No description in source.
moduleNameString moduleName()No description in source.
namevoid name(String t)No description in source.
setPricevoid setPrice(int cents, boolean couldPay)No description in source.
decidevoid decide(String move)Record one pre-decided Game-Engineering move.
moveAtString moveAt(int i)No description in source.
movesint moves()No description in source.
paidboolean paid()No description in source.
priceint price()No description in source.
ynString yn(boolean v)No description in source.
describeString describe()No description in source.

DiceRoll #sleela 2.5 (lib/gameplay/DiceRoll.sleela)

DiceRoll class

Defines DiceRoll, the deterministic percent-roller at the heart of the gameplay package. Every "80% then 20%" and "50/50" in a turn is a DiceRoll. It is a seeded linear-congruential generator, so a given seed always replays the same game — the archive must repeat, even the luck. DiceRoll is a NATURAL / LOADABLE MODULE sharing the common module contract (load / loaded / moduleName / describe). It holds a single 32-bit-ish state word and advances it on every roll. No native randomness is used; "live play" is modeled by advancing the same deterministic stream. Family: gameplay.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
MODULEstatic final String MODULE = "DiceRoll"No description in source.
MODULUSstatic final int MODULUS = 21474836472^31 - 1, a classic LCG modulus
MULTstatic final int MULT = 48271MINSTD multiplier
loadedFlagint loadedFlagNo description in source.
stateint statecurrent generator state, 1..MODULUS-1
rollCountint rollCounthow many rolls this stream has produced

Methods — the actions this unit can perform.

MethodSignatureWhat it does
loadvoid load()--- loadable-module contract ------------------------------------------
loadedboolean loaded()No description in source.
moduleNameString moduleName()No description in source.
seedvoid seed(int s)Seed the stream. The same seed replays the same sequence, every time.
nextint next()Advance and return the next raw value in 1..MODULUS-1.
percentint percent()A percentage result in 0..99 for the next step of play.
rollUnderboolean rollUnder(int chance)Roll against a target: returns true when the roll "succeeds" at `chance` percent. chance<=0 never succeeds; chance>=100 always does.
coinFlipboolean coinFlip()The 50/50 your "ask for help" move leans on.
betweenint between(int lo, int hi)A value in [lo, hi] inclusive, for picking amounts and indices.
rollsint rolls()No description in source.
describeString describe()No description in source.

ExpectedFuture #sleela 2.5 (lib/gameplay/ExpectedFuture.sleela)

ExpectedFuture class

Defines ExpectedFuture, the forward-looking projection the Inference Engine shows a Player on a winning "ask for help" roll. It answers the one question move (b) exists to answer: am I on schedule in my own custom game? It holds a projected turn, a target turn, and the gap between. ExpectedFuture is a NATURAL / LOADABLE MODULE sharing the common module contract (load / loaded / moduleName / describe). It is produced by InferenceEngine; a Player reads onSchedule() and the projected end to decide whether to push, coast, or panic (professionally). Family: gameplay.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
MODULEstatic final String MODULE = "ExpectedFuture"No description in source.
loadedFlagint loadedFlagNo description in source.
currentTurnint currentTurnwhere the player is now
projectedEndint projectedEndwhen, at this pace, they finish
targetTurnint targetTurnwhen the custom game says they SHOULD finish
confidenceint confidence0..100, how sure the engine is

Methods — the actions this unit can perform.

MethodSignatureWhat it does
loadvoid load()--- loadable-module contract ------------------------------------------
loadedboolean loaded()No description in source.
moduleNameString moduleName()No description in source.
projectvoid project(int now, int projected, int target, int conf)No description in source.
scheduleGapint scheduleGap()Negative = ahead of schedule, 0 = exactly on, positive = behind.
onScheduleboolean onSchedule()No description in source.
behindboolean behind()No description in source.
turnsRemainingint turnsRemaining()No description in source.
confidenceScoreint confidenceScore()No description in source.
ynString yn(boolean v)No description in source.
describeString describe()No description in source.

GameMove #sleela 2.5 (lib/gameplay/GameMove.sleela)

GameMove class

Defines GameMove, the base contract for the three moves a Player may make on a turn: (a) create a help index / friend, (b) ask for help or new routes, (c) create a new desire. A developer adds a move by subclassing GameMove and overriding resolve(), which rolls the dice and returns a MoveOutcome. The base owns identity, the shared context, and the module contract — exactly the base/subclass pattern used by lib/compiler. GameMove is a NATURAL / LOADABLE MODULE sharing the common module contract (load / loaded / moduleName / describe). A move is handed the shared engine and roller through bind(); resolve() does the rest. Family: gameplay.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
MODULEstatic final String MODULE = "GameMove"No description in source.
CHOICE_HELP_INDEXstatic final int CHOICE_HELP_INDEX = 1The three move choices a turn offers. (a) create a help index / friend
CHOICE_ASK_HELPstatic final int CHOICE_ASK_HELP = 2(b) ask for help or new routes
CHOICE_NEW_DESIREstatic final int CHOICE_NEW_DESIRE = 3(c) create a new desire
loadedFlagint loadedFlagNo description in source.
moveNameString moveNamehuman-readable move name
choiceint choiceone of CHOICE_*
diceDiceRoll dicethe shared roller for this turn
engineInferenceEngine enginethe shared modeler for this turn
turnNumberint turnNumberwhich turn this move is being played on

Methods — the actions this unit can perform.

MethodSignatureWhat it does
loadvoid load()--- loadable-module contract ------------------------------------------
loadedboolean loaded()No description in source.
moduleNameString moduleName()No description in source.
declarevoid declare(String name, int whichChoice)A subclass calls this to declare its identity.
bindvoid bind(DiceRoll roller, InferenceEngine inf, int turn)Bind the shared turn context before resolve().
resolveMoveOutcome resolve(Player p)Overridable: run the move and return its outcome. The base move does nothing and reports failure, so an un-overridden move is honest.
nameString name()No description in source.
choiceKindint choiceKind()No description in source.
describeString describe()No description in source.

GameTurn #sleela 2.5 (lib/gameplay/GameTurn.sleela)

GameTurn class

Defines GameTurn, the orchestrator that runs one turn of the gameplay package. It holds the shared DiceRoll and InferenceEngine, offers the Player a choice of the three moves — (a) help index / friend, (b) ask for help / new routes, (c) create a new desire — binds the chosen move to the turn context, resolves it, and applies the resulting MoveOutcome to the Player. GameTurn is a NATURAL / LOADABLE MODULE sharing the common module contract (load / loaded / moduleName / describe). One GameTurn can be reused across many turns; it increments its own turn counter each time play() runs. Family: gameplay.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
MODULEstatic final String MODULE = "GameTurn"No description in source.
loadedFlagint loadedFlagNo description in source.
diceDiceRoll diceNo description in source.
engineInferenceEngine engineNo description in source.
turnNumberint turnNumberNo description in source.
lastOutcomeMoveOutcome lastOutcomeNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
loadvoid load()--- loadable-module contract ------------------------------------------
loadedboolean loaded()No description in source.
moduleNameString moduleName()No description in source.
configurevoid configure(int seed, int targetTurn)Configure the shared roller seed and the custom game's target turn.
playMoveOutcome play(Player p, GameMove move)Play one turn: bind the chosen move, resolve it, apply it to the player. The move is any GameMove subclass, already set up by the caller.
turnint turn()No description in source.
rollerDiceRoll roller()No description in source.
inferenceInferenceEngine inference()No description in source.
latestMoveOutcome latest()No description in source.
describeString describe()No description in source.

HelpIndexMove #sleela 2.5 (lib/gameplay/HelpIndexMove.sleela)

HelpIndexMove class extends GameMove

Move (a) — create a help index or a friend. It generally plays as an 80% roll, then a 20% roll. On the first (80%) roll you build the index and bank solid experience; on the rarer second (20%) roll you also pull the BETTER player's index and your boss's deeper understanding. Each reward is a subevent resolved on its own percentage, live-play, so no two turns feel identical even on the same seed stream. A concrete GameMove: override resolve() to roll and fill a MoveOutcome. Family: gameplay.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
setUpvoid setUp()No description in source.
resolveMoveOutcome resolve(Player p)No description in source.

InferenceEngine #sleela 2.5 (lib/gameplay/InferenceEngine.sleela)

InferenceEngine class

Defines InferenceEngine, the in-game modeler that projects a Player's Expected Future and, when the player instead gets the Boss's help, assembles a DetailedReport with some Game-Engineering moves already decided. This is the brain behind move (b), "ask for help or new routes". InferenceEngine is a NATURAL / LOADABLE MODULE sharing the common module contract (load / loaded / moduleName / describe). It is deterministic: given the same player state and turn, it projects the same future and decides the same moves, so a replayed game infers identically. It names, but does not depend on, the lib/inference-model package family. Family: gameplay.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
MODULEstatic final String MODULE = "InferenceEngine"No description in source.
loadedFlagint loadedFlagNo description in source.
targetTurnint targetTurnthe custom game's intended finishing turn

Methods — the actions this unit can perform.

MethodSignatureWhat it does
loadvoid load()--- loadable-module contract ------------------------------------------
loadedboolean loaded()No description in source.
moduleNameString moduleName()No description in source.
setTargetvoid setTarget(int turn)No description in source.
modelExpectedFuture model(Player p, int now)Project the Player's Expected Future at `now`. Pace is driven by the player's experience: more experience finishes sooner. Confidence rises with the player's Person/Citizen quality — a clearer person is easier to model.
briefDetailedReport brief(Player p, int baseCostCents)Assemble the Boss's DetailedReport: concrete Game-Engineering moves already chosen for the player, priced by the player's own quality. The player pays (or cannot), and that is recorded on the report.
targetint target()No description in source.
describeString describe()No description in source.

ManagementCourtroom #sleela 2.5 (lib/gameplay/ManagementCourtroom.sleela)

ManagementCourtroom class

Defines ManagementCourtroom, the ledger of a Player's standing — the file, tact, and rolls they have accumulated by playing well. Move (c), "create a new desire", is the main way a Player earns a seat here. ManagementCourtroom is a NATURAL / LOADABLE MODULE sharing the common module contract (load / loaded / moduleName / describe). It is pure state: three counters that only ever go up through honest play, and a derived "standing" so a Player knows where they sit in the room. Family: gameplay.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
MODULEstatic final String MODULE = "ManagementCourtroom"No description in source.
loadedFlagint loadedFlagNo description in source.
fileint filedocumented leverage: evidence, memos, the paper trail
tactint tactsocial capital: knowing what to say and when
rollsint rollsbanked extra rolls the player can spend on future turns

Methods — the actions this unit can perform.

MethodSignatureWhat it does
loadvoid load()--- loadable-module contract ------------------------------------------
loadedboolean loaded()No description in source.
moduleNameString moduleName()No description in source.
addFilevoid addFile(int n)No description in source.
addTactvoid addTact(int n)No description in source.
addRollsvoid addRolls(int n)No description in source.
spendRollboolean spendRoll()Spend a banked roll, if any. Returns true if one was available.
fileCountint fileCount()No description in source.
tactCountint tactCount()No description in source.
rollCountint rollCount()No description in source.
standingint standing()Overall standing in the room: the three holdings, weighted. Tact talks loudest, file carries weight, banked rolls are nice to have.
describeString describe()No description in source.

MoveOutcome #sleela 2.5 (lib/gameplay/MoveOutcome.sleela)

MoveOutcome class

Defines MoveOutcome, the result record every GameMove returns — what happened on this turn, in a form the game loop and the player can both read. It carries a headline, whether the move succeeded, and the concrete gains (experience, cash, file/tact/rolls) the move produced. MoveOutcome is a NATURAL / LOADABLE MODULE sharing the common module contract (load / loaded / moduleName / describe). It is a plain carrier: moves fill it in, the turn applies it to the Player, and describe() narrates it. Family: gameplay.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
MODULEstatic final String MODULE = "MoveOutcome"No description in source.
loadedFlagint loadedFlagNo description in source.
moveNameString moveNamewhich move produced this
headlineString headlineone-line summary of what happened
successboolean successdid the move land?
xpGainint xpGainexperience granted
cashGainint cashGaincash granted (net; may be 0)
fileGainint fileGaincourtroom file granted
tactGainint tactGaincourtroom tact granted
rollsGainint rollsGaincourtroom rolls granted

Methods — the actions this unit can perform.

MethodSignatureWhat it does
loadvoid load()--- loadable-module contract ------------------------------------------
loadedboolean loaded()No description in source.
moduleNameString moduleName()No description in source.
beginvoid begin(String move)No description in source.
sayvoid say(String line)No description in source.
succeedvoid succeed()No description in source.
addXpvoid addXp(int n)No description in source.
addCashvoid addCash(int n)No description in source.
addFilevoid addFile(int n)No description in source.
addTactvoid addTact(int n)No description in source.
addRollsvoid addRolls(int n)No description in source.
applyTovoid applyTo(Player p)Apply everything this outcome granted to a Player, in one shot.
landedboolean landed()No description in source.
moveString move()No description in source.
summaryString summary()No description in source.
ynString yn(boolean v)No description in source.
describeString describe()No description in source.

NewDesireMove #sleela 2.5 (lib/gameplay/NewDesireMove.sleela)

NewDesireMove class extends GameMove

Move (c) — create a new desire. You review a slate of likeable, medium portfolio decisions across realistic industries. Reviewing them earns you standing in your Management Courtroom — file, tact, or banked rolls — and the decision you back resolves into profit and a futures read. The game's one law applies: big bets are always winners, where you find them. So when a BIG one shows up, bet big. A concrete GameMove: override resolve() to offer the slate, grant courtroom standing, and resolve the chosen bet into profit. Family: gameplay.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
chosenPortfolioDecision chosenthe decision the player backed
futuresOutlookint futuresOutlooka simple futures read, derived from the result

Methods — the actions this unit can perform.

MethodSignatureWhat it does
setUpvoid setUp()No description in source.
resolveMoveOutcome resolve(Player p)No description in source.
offerPortfolioDecision offer(String industry, int stake, int winPct, int multX10, int size)Build one offered decision bound to the player's industry slate.
expectedint expected(PortfolioDecision d)Expected value of a (non-guaranteed) decision, in cents, for comparison: win% * (stake*mult/10 - stake) - (100-win%)*stake, scaled down by 100.
backedPortfolioDecision backed()No description in source.
futuresint futures()No description in source.

Player #sleela 2.5 (lib/gameplay/Player.sleela)

Player class

Defines Player, the actor who takes a turn in the gameplay package. A Player carries experience, a Person/Citizen quality score (which sets the price they pay for information), cash, and the three things a turn can grant them — file, tact, and rolls — plus a Management Courtroom to keep them in. Player is a NATURAL / LOADABLE MODULE sharing the common module contract (load / loaded / moduleName / describe). The quality score is the hinge of move (b): a higher-quality Person/Citizen is charged more for the Inference Engine's information, because good information finds the people who can use it. Family: gameplay.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
MODULEstatic final String MODULE = "Player"No description in source.
loadedFlagint loadedFlagNo description in source.
handleString handlethe player's name at the table
experienceint experiencemore experience per turn is the whole point
qualityint qualityPerson/Citizen quality, 0..100 (sets info price)
cashCentsint cashCentswhat they can spend on reports
bossUnderstandingint bossUnderstanding0..100 — how much the boss "gets" them this turn
courtroomManagementCourtroom courtroomwhere file / tact / rolls accumulate

Methods — the actions this unit can perform.

MethodSignatureWhat it does
loadvoid load()--- loadable-module contract ------------------------------------------
loadedboolean loaded()No description in source.
moduleNameString moduleName()No description in source.
introducevoid introduce(String name, int startQuality, int startCash)No description in source.
gainExperiencevoid gainExperience(int xp)--- turn rewards -------------------------------------------------------
raiseBossUnderstandingvoid raiseBossUnderstanding(int d)No description in source.
infoPriceCentsint infoPriceCents(int baseCents)The price of information scales with the Player's own quality: a better Person/Citizen pays more, because the report is worth more to them.
payForInfoboolean payForInfo(int baseCents)Try to pay for information. Returns true if the player could afford it.
earnvoid earn(int cents)No description in source.
gainFilevoid gainFile(int n)Convenience pass-throughs to the courtroom.
gainTactvoid gainTact(int n)No description in source.
gainRollsvoid gainRolls(int n)No description in source.
xpint xp()No description in source.
qualityScoreint qualityScore()No description in source.
cashint cash()No description in source.
bossRapportint bossRapport()No description in source.
managementManagementCourtroom management()No description in source.
nameString name()No description in source.
clampint clamp(int v)No description in source.
describeString describe()No description in source.

PortfolioDecision #sleela 2.5 (lib/gameplay/PortfolioDecision.sleela)

PortfolioDecision class

Defines PortfolioDecision, one likeable, medium-sized bet on a realistic industry that a Player reviews during move (c), "create a new desire". Each decision has an industry, a stake, a win chance, and a multiplier — and a size, because the game's one law is: big bets are always winners, where you find them. Bet big. PortfolioDecision is a NATURAL / LOADABLE MODULE sharing the common module contract (load / loaded / moduleName / describe). It models the bet and resolves it against a DiceRoll into a profit, but it does not touch the Player directly; the move that owns it decides what to do with the result. Family: gameplay.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
MODULEstatic final String MODULE = "PortfolioDecision"No description in source.
SIZE_SMALLstatic final int SIZE_SMALL = 0Bet sizes. "Big" is special: in this game a found big bet always pays.
SIZE_MEDIUMstatic final int SIZE_MEDIUM = 1No description in source.
SIZE_BIGstatic final int SIZE_BIG = 2No description in source.
loadedFlagint loadedFlagNo description in source.
industryString industrye.g. "Energy", "Logistics", "Healthcare"
stakeCentsint stakeCentswhat the player puts in
winPercentint winPercentbase chance the bet pays (0..100)
multiplierX10int multiplierX10payout multiple x10 (so 25 = 2.5x), on a win
sizeint sizeone of SIZE_*
resolvedboolean resolvedwhether resolve() has run
wonboolean wonthe outcome, once resolved
profitCentsint profitCentsnet profit (payout - stake) once resolved

Methods — the actions this unit can perform.

MethodSignatureWhat it does
loadvoid load()--- loadable-module contract ------------------------------------------
loadedboolean loaded()No description in source.
moduleNameString moduleName()No description in source.
offervoid offer(String ind, int stake, int winChance, int multX10, int betSize)No description in source.
isGuaranteedboolean isGuaranteed()The game's one law: a BIG bet, once you've found it, always wins. Smaller bets must roll under their win chance like everyone else.
effectiveWinPercentint effectiveWinPercent()No description in source.
resolveint resolve(DiceRoll dice)Resolve the bet against a roller. Profit = payout - stake on a win, else the stake is lost. Big bets always land, so bet big where you find them.
industryNameString industryName()No description in source.
stakeint stake()No description in source.
multiplierTimesTenint multiplierTimesTen()No description in source.
betSizeint betSize()No description in source.
isResolvedboolean isResolved()No description in source.
didWinboolean didWin()No description in source.
profitint profit()No description in source.
sizeNameString sizeName()No description in source.
ynString yn(boolean v)No description in source.
describeString describe()No description in source.

SLPackage #sleela 2.5 (lib/gameplay/SLPackage.sleela)

SLPackage class

Defines the SLeeLa standard-library package for gameplay.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
packageNameString packageNameNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String name)No description in source.
nameString name()No description in source.
availableboolean available()No description in source.