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