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

24
LINES

< > BotCompany Repo | #1006068 // Recognize Kingscrusher's Chess Board

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

Libraryless. Click here for Pure Java version (6386L/44K/145K).

1  
!752
2  
3  
static ShootLoop shootLoop;
4  
5  
p {
6  
  makeBot();
7  
  (shootLoop = new ShootLoop {
8  
    { precision = 0.95f; }
9  
    
10  
    void recognize {
11  
      Rect king = findImage("#1006072"); // white king on dark square
12  
      if (king == null)
13  
        king = findImage("#1006069"); // white king on light square
14  
      print("White king found: " + king);
15  
    }
16  
  }).run();
17  
}
18  
19  
answer {
20  
  if (swic(s, "precision ")) {
21  
    shootLoop.precision = parseFloat(dropPrefixTrim("precision", s));
22  
    ret "ok";
23  
  }
24  
}

Author comment

Began life as a copy of #1005885

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1006068
Snippet name: Recognize Kingscrusher's Chess Board
Eternal ID of this version: #1006068/1
Text MD5: 12ad89e7cf0da098a51604b8c53862a0
Transpilation MD5: 8a752a4ba093b8f4451432e26d0f112c
Author: stefan
Category: javax / ocr
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-12-17 00:43:05
Source code size: 513 bytes / 24 lines
Pitched / IR pitched: No / No
Views / Downloads: 500 / 603
Referenced in: [show references]