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

16
LINES

< > TinyBrain | #1008872 - loadWoodyBot

JavaX fragment (include)

static WoodyBot loadWoodyBot(S botID) {
  new WoodyBot bot;
  File zip = loadLibrary(botID);
  
  // Find out main folder name ("Woody-2017-...")
  S prefix = commonPrefixMulti(listFilesInZip(zip));
  int i = prefix.indexOf('/');
  S mainFolderName = i >= 0 ? substring(prefix, 0, i) : "";
  
  bot.files = zipFileSnippetToLazyTextMap_subfolder(botID, mainFolderName);
  bot.globals = ctxLoadGlobals(botID);
  bot.regexpMacros = ctxLoadRegexpMacros(botID);
  
  woodyLoadRules(bot);
  ret bot;
}

download  show line numbers  debug dex   

Travelled to 2 computer(s): cfunsshuasjs, tvejysmllsmz

No comments. add comment

Snippet ID: #1008872
Snippet name: loadWoodyBot
Eternal ID of this version: #1008872/6
Text MD5: 74fa9e1ae8c7680d2b90612f3b1402d5
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-06-21 18:26:01
Source code size: 510 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 18 / 24
Version history: 5 change(s)
Referenced in: [show]