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

20
LINES

< > BotCompany Repo | #1001699 // Botifier (developing)

JavaX source code - run with: x30.jar

// Botifier takes a program with an "answer" function and turns it into a bot.

!747

m {
  static S botID = "#1001694";
  static S botName = "Points Bot.";
  
  p {
    L<S> tok = javaTok(loadSnippet(botID));
    L<S> main = getMainProgram(tok);
    tokAppend(main, "makeAndroid(" + quote(botName) + ");");
    createTempProgram(join(tok), botName);
  }
  
  // destroys the CNC structure but keeps the length intact
  static void tokAppend(L<S> tok, S text) {
    tok.set(tok.size()-1, tok.get(tok.size()-1) + text);
  }
}

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: #1001699
Snippet name: Botifier (developing)
Eternal ID of this version: #1001699/1
Text MD5: 8ee80df4d77157bc47b66d7d3e99351f
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-11-05 16:22:20
Source code size: 543 bytes / 20 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 511 / 484
Referenced in: #1001700 - Quick Botifier
#3000202 - Answer for stefanreich (>> T conversion bot)
#3000238 - Answer for stefanreich (>> t power bot)
#3000382 - Answer for ferdie (>> t = 1, f = 0)
#3000383 - Answer for funkoverflow (>> t=1, f=0 okay)