Libraryless. Click here for Pure Java version (1739L/11K/36K).
!752 static class Sister { S name, url, robotURL; } static Sister sister; p { load("sister"); } static boolean has() { ret sister != null; } synchronized answer { if "do you have a sister" ret yn(has()); if "what is your sister's name" if (!has()) ret "Ain't got no sister yo"; else ret or(sister.name, "I don't know"); if "what is your sister's url" if (!has()) ret "Ain't got no sister yo"; else ret or(sister.url, "I don't know"); if "what is your sister's robot url" if (!has()) ret "Ain't got no sister yo"; else ret or(sister.robotURL, "I don't know"); if (master()) { // master stuff if "now you have a sister" { makeSister(); ret "Cool!"; } if "you have no sister anymore" { if (has()) { sister = null; save("sister"); ret "Aw... what happened to her?"; } ret "Woot? Didn't have one anyway"; } if "your sister's name is *" exceptionToUser { if (!has()) makeSister(); sister.name = eqic("unknown", m.unq(0)) ? null : m.unq(0); save("sister"); ret "OK!"; } if "your sister's url is *" exceptionToUser { S url = m.unq(0); if (!has()) makeSister(); if (eqic("unknown", url)) sister.url = null; else { assertTrue("not an url", isURL(url)); sister.url = url; } save("sister"); ret "OK!"; } if "your sister's robot url is *" exceptionToUser { S url = m.unq(0); if (!has()) makeSister(); if (eqic("unknown", url)) sister.robotURL = null; else { assertTrue("not an url", isURL(url)); sister.robotURL = url; } save("sister"); ret "OK!"; } } } static synchronized Sister _get() { ret sister; } static void makeSister() { sister = new Sister; save("sister"); }
Began life as a copy of #1002596
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment