Libraryless. Click here for Pure Java version (1430L/10K/32K).
1 | !752 // current standard translator |
2 | |
3 | // main program |
4 | |
5 | p { |
6 | makeBot("NL Test Bot."); |
7 | } |
8 | |
9 | // S = String, s is the question, you return the answer. |
10 | |
11 | static S answer(S s) { |
12 | // match is flexible in terms of case and punctuation |
13 | |
14 | if (match("hello", s)) |
15 | ret "Hello you too!"; // ret = return |
16 | |
17 | ret null; // unknown question |
18 | } |
19 | |
20 | // That is all! Now get tinybrain.de/x30.jar and run your program :) |
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, teubizvjbppd, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1001884 |
Snippet name: | Simple NL Bot Example |
Eternal ID of this version: | #1001884/1 |
Text MD5: | 26a7320b62e625098f9212b9518e63ed |
Transpilation MD5: | 03701b060cc920fccb2149008dcbb46c |
Author: | stefan |
Category: | javax |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2015-12-02 18:33:03 |
Source code size: | 424 bytes / 20 lines |
Pitched / IR pitched: | No / Yes |
Views / Downloads: | 674 / 716 |
Referenced in: | [show references] |