Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

14
LINES

< > BotCompany Repo | #1017661 // Bot Initiative Spike [dev.]

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Libraryless. Click here for Pure Java version (7807L/57K).

1  
!7
2  
3  
p-exp {
4  
  L<IfThen> rules = mL_parsedNLRulesWithoutIDs("Initiative rules");
5  
  for (IfThen rule : shuffledIterator(rules)) {
6  
    Pair<Exp> p = nlLogic_extractFirstCondition(rule.in);
7  
    if (p == null) continue;
8  
    if (nlLogic_isFunc(p.a, 'initiative)) {
9  
      print(nlLogic_text(((Func) p.a).arg));
10  
      print("Remaining: " + sfu(IfThen(p.b, rule.out)));
11  
      break;
12  
    }
13  
  }
14  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1017661
Snippet name: Bot Initiative Spike [dev.]
Eternal ID of this version: #1017661/4
Text MD5: d92ff6acef8c7e8bd6b513f63d4dee13
Transpilation MD5: c731c6417306a5680ce7a55762667e52
Author: stefan
Category: javax / a.i.
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-07-31 19:21:24
Source code size: 398 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 335 / 853
Version history: 3 change(s)
Referenced in: [show references]