let x;
let y;

let xspeed;
let yspeed;

function preload(){
  dvd = loadimage(https://static1.squarespace.com/static/58eff58659cc68f36152b6ba/t/5cdb59aa652dea67cb2861fa/1557879211104/dvd.PNG);
}
function setup() {
  createCanvas(800, 600);
  x = random(width);
  y = random(height);
  xspeed = 5;
  yspeed = 5;
}

function draw() {
  background(0);
  image(dvd, x, y);
  
  x = x + xspeed;
  y = y + yspeed;
  
  if (x + dvd.width >= width) {
    xspeed = -xspeed;
    x = width - dvd.width;
  } else if (x <= 0) {
    xspeed = -xspeed;
    x= 0;
}
    if (y + dvd.height >= height) {
    yspeed = -yspeed;
      y = height - dvd.height;
}else if (y <= 0) {
  yspeed = -yspeed;
  y = 0;
    }
}