We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 357701a commit 1ef9cbaCopy full SHA for 1ef9cba
snake.js
@@ -11,8 +11,8 @@ class Snake {
11
12
buildTail() {
13
// start in the middle of screen
14
- let middleOfScreenVertical = this.verticalSquares / 2;
15
- let middleOfScreenHorizontal = this.horizontalSquares / 2;
+ let middleOfScreenVertical = Math.trunc(this.verticalSquares / 2);
+ let middleOfScreenHorizontal = Math.trunc(this.horizontalSquares / 2);
16
17
for (let i=0; i<this.tail; i++) {
18
this.trail.push({
0 commit comments