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

Method constructor

JDJRValidator_Pure.js:392–407  ·  view source on GitHub ↗
(puzzleX)

Source from the content-addressed store, hash-verified

390
391class MousePosFaker {
392 constructor(puzzleX) {
393 this.x = parseInt(Math.random() * 20 + 20, 10);
394 this.y = parseInt(Math.random() * 80 + 80, 10);
395 this.t = Date.now();
396 this.pos = [[this.x, this.y, this.t]];
397 this.minDuration = parseInt(1000 / HZ, 10);
398 // this.puzzleX = puzzleX;
399 this.puzzleX = puzzleX + parseInt(Math.random() * 2 - 1, 10);
400
401 this.STEP = parseInt(Math.random() * 6 + 5, 10);
402 this.DURATION = parseInt(Math.random() * 7 + 14, 10) * 100;
403 // [9,1600] [10,1400]
404 this.STEP = 9;
405 // this.DURATION = 2000;
406 // console.log(this.STEP, this.DURATION);
407 }
408
409 run() {
410 const perX = this.puzzleX / this.STEP;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected