function distance(player, entityX, entityY) {
  //d = sqrt(x^2 + y^2)
  let playerX = player.x;
  let playerY = player.y;
  let xDelta = playerX - entityX;
  let yDelta = playerY - entityY;
  let distanceSq = xDelta * xDelta + yDelta * yDelta;
  return Math.sqrt(distanceSq);
}
Calculate the distance between two entities.
@param {*} player player
@param {*} entityX target entity X
@param {*} entityY target entity Y
@returns