Transpiled version (1992L) is out of date.
1 | !759 |
2 | |
3 | sS coreName = /*"Let's do GMail"*/ "Simple Hello"; |
4 | |
5 | static new L<Dialog> dialogs; |
6 | static OccTree<E> tree; |
7 | |
8 | p { |
9 | dialogs = loadDialogs(coreName); |
10 | tree = dialogs2occTree(dialogs); |
11 | testBot(dummyBot()); |
12 | } |
13 | |
14 | sclass Scores { |
15 | int good, bad; |
16 | } |
17 | |
18 | static void testBot(O bot) { |
19 | new Scores scores; |
20 | testTree(bot, tree, scores); |
21 | } |
22 | |
23 | static void testTree(O bot, OccTree<E> tree, Scores scores) { |
24 | if (tree.followUp.isEmpty()) ret; |
25 | |
26 | for (E e : keys(tree.followUp)) { |
27 | if (eq(e.state, "good")) |
28 | ++scores.good; |
29 | else if (eq(e.state, "bad")) |
30 | ++scores.bad; |
31 | testTree(bot, tree, scores); |
32 | } |
33 | } |
34 | |
35 | static O dummyBot() { |
36 | ret new O { |
37 | L<E> get(L<E> input) { ret emptyList(); } |
38 | }; |
39 | } |
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1003326 |
Snippet name: | GMail Bot Tester (dev.) |
Eternal ID of this version: | #1003326/1 |
Text MD5: | e41a9ad4628841e29a5b8a542ad6f579 |
Author: | stefan |
Category: | javax / talking robots |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-06-19 23:16:31 |
Source code size: | 739 bytes / 39 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 667 / 707 |
Referenced in: | [show references] |