ManagementCourtroom.sleela
lib/gameplay/ManagementCourtroom.sleela · 98 line(s) · sleela
<< lib/gameplay/ManagementCourtroom.sleela
SLeeLa Standard Library Definition.
Definition: 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. >>
#sleela 2.5
material;
< Unified SLeeLa SDK front-end object. >
class ManagementCourtroom {
< ---- Descriptive metadata (version 1.11 nested-friendly accessors) ---- >
<< Eleven catalogued attributes with getter/setter pairs, so a GUI, loader,
or catalog can read and (where appropriate) override this record.
Values are faithful to the subject's real origin where publicly known. >>
String metaVersion = "1.0.0";
int metaId = 10331;
String metaAuthor = "Kiro Agent";
String metaDate = "2026-10-16";
String metaCopyright = "SLeeLa project";
String metaTrademark = "none";
String metaCorporation = "none";
< metaOrigin: National | <nation> | International | Galactic >
String metaOrigin = "International";
String metaBirthDate = "2026-10-07";
< metaScienceRating: maturity/robustness on a 1..10 scale >
int metaScienceRating = 9;
< metaNationalSchedule: a real, citable instrument or "none" >
String metaNationalSchedule = "none";
String getMetaVersion() { return metaVersion; }
void setMetaVersion(String v) { metaVersion = v; }
int getMetaId() { return metaId; }
void setMetaId(int v) { metaId = v; }
String getAuthor() { return metaAuthor; }
void setAuthor(String v) { metaAuthor = v; }
String getDate() { return metaDate; }
void setDate(String v) { metaDate = v; }
String getCopyright() { return metaCopyright; }
void setCopyright(String v) { metaCopyright = v; }
String getTrademark() { return metaTrademark; }
void setTrademark(String v) { metaTrademark = v; }
String getCorporation() { return metaCorporation; }
void setCorporation(String v) { metaCorporation = v; }
String getOrigin() { return metaOrigin; }
void setOrigin(String v) { metaOrigin = v; }
String getBirthDate() { return metaBirthDate; }
void setBirthDate(String v) { metaBirthDate = v; }
int getScienceRating() { return metaScienceRating; }
void setScienceRating(int v) { metaScienceRating = v; }
String getNationalSchedule() { return metaNationalSchedule; }
void setNationalSchedule(String v) { metaNationalSchedule = v; }
static final String MODULE = "ManagementCourtroom";
int loadedFlag;
< documented leverage: evidence, memos, the paper trail >
int file;
< social capital: knowing what to say and when >
int tact;
< banked extra rolls the player can spend on future turns >
int rolls;
< --- loadable-module contract ------------------------------------------ >
void load() { loadedFlag = 1; file = 0; tact = 0; rolls = 0; }
boolean loaded() { return loadedFlag == 1; }
String moduleName() { return MODULE; }
void addFile(int n) { if (n > 0) { file = file + n; } }
void addTact(int n) { if (n > 0) { tact = tact + n; } }
void addRolls(int n) { if (n > 0) { rolls = rolls + n; } }
< Spend a banked roll, if any. Returns true if one was available. >
boolean spendRoll() {
if (rolls <= 0) { return false; }
rolls = rolls - 1;
return true;
}
int fileCount() { return file; }
int tactCount() { return tact; }
int rollCount() { return rolls; }
< Overall standing in the room: the three holdings, weighted. Tact talks >
< loudest, file carries weight, banked rolls are nice to have. >
int standing() { return tact * 3 + file * 2 + rolls; }
String describe() {
return MODULE + " file=" + file + " tact=" + tact
+ " rolls=" + rolls + " standing=" + standing();
}
}