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

Method fixPos

JDJRValidator_Pure.js:446–457  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

444 }
445
446 fixPos() {
447 const actualX = this.pos[this.pos.length - 1][0] - this.pos[1][0];
448 const deviation = this.puzzleX - actualX;
449
450 if (Math.abs(deviation) > 4) {
451 this.moveToAndCollect({
452 x: deviation,
453 y: parseInt(Math.random() * 8 - 3, 10),
454 duration: 250,
455 });
456 }
457 }
458
459 moveToAndCollect({x, y, duration}) {
460 let movedX = 0;

Callers 1

runMethod · 0.95

Calls 1

moveToAndCollectMethod · 0.95

Tested by

no test coverage detected