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

44
LINES

< > BotCompany Repo | #1007138 // A. I. Game 6.3 / Recognize 4 Letters [UNSOLVED]

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

Uses 3874K of libraries. Click here for Pure Java version (9183L/66K/229K).

!7

!include #1007130 // AI Game Include

p {
  pGame();
}

//////////////////////////////////////
// Test AIs. Just add your own here //
//////////////////////////////////////

AI > HorizontalAutoSplit {
  ExternalTextAI letterAI;
  static ImageSurface is;
  long lastUpdate;
  
  *() {
    loading { letterAI = loadWinnerTextAI(#1007131); }
    setOpt(letterAI.ai, lax := true);
  }
  
  void go {
    horizontalAutoSplit2_threshold = 0.3f;
    L<BWImage> letters = horizontalAutoSplitToImages(new BWImage(image()));
    if (sysNow() > lastUpdate+500) {
      lastUpdate = sysNow();
      is = showZoomedImage_centered(is, "Horizontal Split", mergeBWImagesHorizontally(letters).toRGB());
    }
    new StringBuilder buf;
    for (BWImage img : letters)
      buf.append(letterAI.call(img.getBufferedImage()));
    submit(str(buf));
  }
}

//////////////////
// PUZZLE MAKER //
//////////////////

static Puzzle makePuzzle() {
  S text = randomID(4);
  ret new Puzzle("Enter the lowercase text you see:", renderSourceCode_1(text), text);
}

Author comment

Began life as a copy of #1007132

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: #1007138
Snippet name: A. I. Game 6.3 / Recognize 4 Letters [UNSOLVED]
Eternal ID of this version: #1007138/1
Text MD5: 98da2007bd3203358d55ede4afe22e54
Transpilation MD5: 99f4f9d4de111502c7f62cc4266c10d1
Author: stefan
Category: javax / gui
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-03-06 14:16:23
Source code size: 1083 bytes / 44 lines
Pitched / IR pitched: No / No
Views / Downloads: 439 / 519
Referenced in: [show references]