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

Method run

JDJRValidator_Pure.js:409–424  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

407 }
408
409 run() {
410 const perX = this.puzzleX / this.STEP;
411 const perDuration = this.DURATION / this.STEP;
412 const firstPos = [this.x - parseInt(Math.random() * 6, 10), this.y + parseInt(Math.random() * 11, 10), this.t];
413
414 this.pos.unshift(firstPos);
415 this.stepPos(perX, perDuration);
416 this.fixPos();
417
418 const reactTime = parseInt(60 + Math.random() * 100, 10);
419 const lastIdx = this.pos.length - 1;
420 const lastPos = [this.pos[lastIdx][0], this.pos[lastIdx][1], this.pos[lastIdx][2] + reactTime];
421
422 this.pos.push(lastPos);
423 return this.pos;
424 }
425
426 stepPos(x, duration) {
427 let n = 0;

Callers

nothing calls this directly

Calls 2

stepPosMethod · 0.95
fixPosMethod · 0.95

Tested by

no test coverage detected