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

Method fixPos

jd_validate.js:376–387  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

374 }
375
376 fixPos() {
377 const actualX = this.pos[this.pos.length - 1][0] - this.pos[1][0];
378 const deviation = this.puzzleX - actualX;
379
380 if (Math.abs(deviation) > 4) {
381 this.moveToAndCollect({
382 x: deviation,
383 y: parseInt(Math.random() * 8 - 3, 10),
384 duration: 250,
385 });
386 }
387 }
388
389 moveToAndCollect({x, y, duration}) {
390 let movedX = 0;

Callers 1

runMethod · 0.95

Calls 1

moveToAndCollectMethod · 0.95

Tested by

no test coverage detected