Libraryless. Click here for Pure Java version (3729L/25K/85K).
1 | !752 |
2 | |
3 | !include #1004681 // Concepts |
4 | //include #1004848 // AIJob custom class |
5 | |
6 | static S dbName = "AI Jobs."; |
7 | sbool doIt = true; |
8 | |
9 | p { |
10 | DialogIO db = findBot(dbName); |
11 | |
12 | for (PassRef job : (L<PassRef>) rpc(db, "xlist", "AIJob")) { |
13 | S desc = cast rpc(db, "xget", job, "description"); |
14 | bool hot = cast rpc(db, "xget", job, "hot"); |
15 | bool doing = cast rpc(db, "xget", job, "doing"); |
16 | bool done = cast rpc(db, "xget", job, "done"); |
17 | S type = done ? "DONE Job" |
18 | : doing ? "Job being done" |
19 | : hot ? "HOT JOB" : "Non-hot Job"; |
20 | print(type + " >> " + desc); |
21 | if (hot && !done && !doing && match("show a clapping audience", desc)) { |
22 | print("I can do this!!"); |
23 | if (doIt) { |
24 | print("Doing the job!!"); |
25 | PassRef doingObj = cast rpc(db, "xnew", "Doing", new O[] {"theJob", job, "programDoingIt", programID(), "vmID", vmID()}); |
26 | rpc(db, "xset", job, "doing", true); |
27 | |
28 | applaud(); // show the animation! |
29 | |
30 | rpc(db, "xset", job, "done", true); |
31 | } |
32 | } |
33 | } |
34 | |
35 | db.close(); |
36 | } |
Began life as a copy of #1004847
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1004851 |
Snippet name: | Solve An AI Job (Show Clapping Audience) |
Eternal ID of this version: | #1004851/1 |
Text MD5: | 743af26a65f8ff425c25f89fd7dc6746 |
Transpilation MD5: | e9ac4b3cb74af622cc369cf0ca126269 |
Author: | stefan |
Category: | javax |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-09-05 17:40:27 |
Source code size: | 1086 bytes / 36 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 584 / 688 |
Referenced in: | [show references] |