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

Method constructor

jd_validate.js:323–337  ·  view source on GitHub ↗
(puzzleX)

Source from the content-addressed store, hash-verified

321
322class MousePosFaker {
323 constructor(puzzleX) {
324 this.x = parseInt(Math.random() * 20 + 20, 10);
325 this.y = parseInt(Math.random() * 80 + 80, 10);
326 this.t = Date.now();
327 this.pos = [[this.x, this.y, this.t]];
328 this.minDuration = parseInt(1000 / HZ, 10);
329 // this.puzzleX = puzzleX;
330 this.puzzleX = puzzleX + parseInt(Math.random() * 2 - 1, 10);
331
332 this.STEP = parseInt(Math.random() * 6 + 5, 10);
333 this.DURATION = parseInt(Math.random() * 7 + 14, 10) * 100;
334 // [9,1600] [10,1400]
335 this.STEP = 9;
336 // this.DURATION = 2000;
337 }
338
339 run() {
340 const perX = this.puzzleX / this.STEP;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected