()
| 421 | } |
| 422 | } |
| 423 | fixPos() { |
| 424 | const actualX = this.pos[this.pos.length - 1][0] - this.pos[1][0]; |
| 425 | const deviation = this.puzzleX - actualX; |
| 426 | if (Math.abs(deviation) > 4) { |
| 427 | this.moveToAndCollect({ |
| 428 | x: deviation, |
| 429 | y: parseInt(Math.random() * 8 - 3, 10), |
| 430 | duration: 100, |
| 431 | }); |
| 432 | } |
| 433 | } |
| 434 | moveToAndCollect({ |
| 435 | x, |
| 436 | y, |
no test coverage detected