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

!752

static ShootLoop shootLoop;

p {
  makeBot();
  (shootLoop = new ShootLoop {
    { precision = 0.95f; }
    
    void recognize {
      Rect king = findImage("#1006072"); // white king on dark square
      if (king == null)
        king = findImage("#1006069"); // white king on light square
      print("White king found: " + king);
    }
  }).run();
}

answer {
  if (swic(s, "precision ")) {
    shootLoop.precision = parseFloat(dropPrefixTrim("precision", s));
    ret "ok";
  }
}

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