MCPcopy Create free account
hub / github.com/6dylan6/jdm / fixPos

Method fixPos

function/jdValidate.js:423–433  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

421 }
422 }
423 fixPos() {
424 const actualX = this.pos[this.pos.length - 1][0] - this.pos[1][0];
425 const deviation = this.puzzleX - actualX;
426 if (Math.abs(deviation) > 4) {
427 this.moveToAndCollect({
428 x: deviation,
429 y: parseInt(Math.random() * 8 - 3, 10),
430 duration: 100,
431 });
432 }
433 }
434 moveToAndCollect({
435 x,
436 y,

Callers 1

runMethod · 0.95

Calls 2

moveToAndCollectMethod · 0.95
randomMethod · 0.45

Tested by

no test coverage detected