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).

1  
!7
2  
3  
!include #1007130 // AI Game Include
4  
5  
p {
6  
  pGame();
7  
}
8  
9  
//////////////////////////////////////
10  
// Test AIs. Just add your own here //
11  
//////////////////////////////////////
12  
13  
AI > HorizontalAutoSplit {
14  
  ExternalTextAI letterAI;
15  
  static ImageSurface is;
16  
  long lastUpdate;
17  
  
18  
  *() {
19  
    loading { letterAI = loadWinnerTextAI(#1007131); }
20  
    setOpt(letterAI.ai, lax := true);
21  
  }
22  
  
23  
  void go {
24  
    horizontalAutoSplit2_threshold = 0.3f;
25  
    L<BWImage> letters = horizontalAutoSplitToImages(new BWImage(image()));
26  
    if (sysNow() > lastUpdate+500) {
27  
      lastUpdate = sysNow();
28  
      is = showZoomedImage_centered(is, "Horizontal Split", mergeBWImagesHorizontally(letters).toRGB());
29  
    }
30  
    new StringBuilder buf;
31  
    for (BWImage img : letters)
32  
      buf.append(letterAI.call(img.getBufferedImage()));
33  
    submit(str(buf));
34  
  }
35  
}
36  
37  
//////////////////
38  
// PUZZLE MAKER //
39  
//////////////////
40  
41  
static Puzzle makePuzzle() {
42  
  S text = randomID(4);
43  
  ret new Puzzle("Enter the lowercase text you see:", renderSourceCode_1(text), text);
44  
}

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: 512 / 616
Referenced in: [show references]