(bg, patch, y)
| 64 | |
| 65 | class PuzzleRecognizer { |
| 66 | constructor(bg, patch, y) { |
| 67 | // console.log(bg); |
| 68 | const imgBg = new PNGDecoder(Buffer.from(bg, 'base64')); |
| 69 | const imgPatch = new PNGDecoder(Buffer.from(patch, 'base64')); |
| 70 | |
| 71 | // console.log(imgBg); |
| 72 | |
| 73 | this.bg = imgBg; |
| 74 | this.patch = imgPatch; |
| 75 | this.rawBg = bg; |
| 76 | this.rawPatch = patch; |
| 77 | this.y = y; |
| 78 | this.w = imgBg.width; |
| 79 | this.h = imgBg.height; |
| 80 | } |
| 81 | |
| 82 | async run() { |
| 83 | await this.bg.decodeToPixels(); |
nothing calls this directly
no outgoing calls
no test coverage detected