MCPcopy Create free account
hub / github.com/Semporia/Scripts / recognize

Method recognize

jd_validate.js:180–199  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

178 }
179
180 async recognize() {
181 const data = await JDJRValidator.jsonp('/slide/g.html', {e: ''});
182 const {bg, patch, y} = data;
183 // const uri = 'data:image/png;base64,';
184 // const re = new PuzzleRecognizer(uri+bg, uri+patch, y);
185 const re = new PuzzleRecognizer(bg, patch, y);
186 const puzzleX = await re.run();
187
188 if (puzzleX > 0) {
189 this.data = {
190 c: data.challenge,
191 w: re.w,
192 e: '',
193 s: '',
194 o: '',
195 };
196 this.x = puzzleX;
197 }
198 return puzzleX;
199 }
200
201 async report(n) {
202 console.time('PuzzleRecognizer');

Callers 2

tryRecognizeMethod · 0.95
reportMethod · 0.95

Calls 2

runMethod · 0.95
jsonpMethod · 0.45

Tested by

no test coverage detected