(bg, patch, y)
| 45 | const PUZZLE_PAD = 10; |
| 46 | class PuzzleRecognizer { |
| 47 | constructor(bg, patch, y) { |
| 48 | // console.log(bg); |
| 49 | const imgBg = new PNGDecoder(Buffer.from(bg, 'base64')); |
| 50 | const imgPatch = new PNGDecoder(Buffer.from(patch, 'base64')); |
| 51 | // console.log(imgBg); |
| 52 | this.bg = imgBg; |
| 53 | this.patch = imgPatch; |
| 54 | this.rawBg = bg; |
| 55 | this.rawPatch = patch; |
| 56 | this.y = y; |
| 57 | this.w = imgBg.width; |
| 58 | this.h = imgBg.height; |
| 59 | } |
| 60 | async run() { |
| 61 | await this.bg.decodeToPixels(); |
| 62 | await this.patch.decodeToPixels(); |
nothing calls this directly
no outgoing calls
no test coverage detected