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

12
LINES

< > BotCompany Repo | #1023220 // rule_useryWants_1

JavaX fragment (include)

1  
static WordTokRule rule_useryWants_1(Set<S> facts) {
2  
  ret new WordTokRule("Usery wants that X", "X") {
3  
    run {
4  
      S x_simplified = simpleSpaces_nTok(getVar("X"));
5  
      if (contains(facts, x_simplified))
6  
        emit(extMarkAs answer("But " + x_simplified + " already"));
7  
      else if (contains(facts, "It is impossible that " + curly(x_simplified)))
8  
        emit(extMarkAs answer("No way brother"));
9  
      else if (debug) print("Can't decide on: " + x_simplified);
10  
    }
11  
  };
12  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1023220
Snippet name: rule_useryWants_1
Eternal ID of this version: #1023220/1
Text MD5: 59738c4aac9181f463c145ddf9ebc223
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-05-16 21:36:13
Source code size: 496 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 266 / 293
Referenced in: [show references]