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

25
LINES

< > BotCompany Repo | #1009363 // Happy Bot [OK except for bug in tempShowEmotion]

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

Libraryless. Click here for Pure Java version (9859L/66K/233K).

!7

concept Happiness {
  long level;
}

p { db(); bot(); }

answer {
  if "thanks" ret happy();
  if "i love you" ret happy();
  if "you did good" ret happy();
  if "nice" ret happy();
  
  if "how happy are you" ret "I am " + happiness().level + " times happy";
}

sS happy() {
  happiness().level++;
  happiness().change();
  tempShowEmotion("happy");
  ret ":-)";
}

static Happiness happiness() { ret uniq(Happiness); }

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1009363
Snippet name: Happy Bot [OK except for bug in tempShowEmotion]
Eternal ID of this version: #1009363/3
Text MD5: 47975877e9d02ea408f03af1411d0825
Transpilation MD5: 6679b022975b64f23820bea5ffb042af
Author: stefan
Category: javax / a.i. / gui
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-07-24 19:55:56
Source code size: 448 bytes / 25 lines
Pitched / IR pitched: No / No
Views / Downloads: 571 / 630
Version history: 2 change(s)
Referenced in: [show references]