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

Method constructor

jd_joy_new.js:336–351  ·  view source on GitHub ↗
(puzzleX)

Source from the content-addressed store, hash-verified

334
335class MousePosFaker {
336 constructor(puzzleX) {
337 this.x = parseInt(Math.random() * 20 + 20, 10);
338 this.y = parseInt(Math.random() * 80 + 80, 10);
339 this.t = Date.now();
340 this.pos = [[this.x, this.y, this.t]];
341 this.minDuration = parseInt(1000 / HZ, 10);
342 // this.puzzleX = puzzleX;
343 this.puzzleX = puzzleX + parseInt(Math.random() * 2 - 1, 10);
344
345 this.STEP = parseInt(Math.random() * 6 + 5, 10);
346 this.DURATION = parseInt(Math.random() * 7 + 14, 10) * 100;
347 // [9,1600] [10,1400]
348 this.STEP = 9;
349 // this.DURATION = 2000;
350 // console.log(this.STEP, this.DURATION);
351 }
352
353 run() {
354 const perX = this.puzzleX / this.STEP;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected