MCPcopy Create free account
hub / github.com/Toulu-debug/enen / constructor

Method constructor

utils/validate_single.js:390–405  ·  view source on GitHub ↗
(puzzleX)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

logMethod · 0.45

Tested by

no test coverage detected