'use strict'

class PowerUp{
  constructor(options) {
    this.x = getRandomIntInclusive(1, options.canvas.width - 10)
    this.y = getRandomIntInclusive(1, options.canvas.height - 10)
    this.context = options.context
    this.height = 10
    this.width = 10
  }

  get draw() {
    this.context.fillStyle="yellow";
    this.context.fillRect(this.x, this.y, this.width, this.height);
    return this;
  }

  get eaten() {
    this.context.clearRect(this.x, this.y, this.width, this.height);
  }
}

function getRandomIntInclusive(min, max) {
  var random = Math.floor(Math.random() * (max - min + 1)) + min;
  return Math.round(random / 10) * 10;
}


module.exports = PowerUp;

@@ -74,33 +74,33 @@
 domIntInclusive(
-1
+6
 , options.canvas
@@ -147,17 +147,17 @@
 clusive(
-1
+6
 , option

Update powerup.js