function collides(a, b) {
  return a.x < b.x + b.width  &&
         a.x + a.width  > b.x &&
         a.y < b.y + b.height  &&
         a.y + a.height  > b.y;
}
// checks if two objects with x and y values are in contact
checks if two objects with x and y values are in contact
checks if two objects with x and y values are in contact
function collides(a, b) {
  return a.x < b.x + b.width  &&
         a.x + a.width  > b.x &&
         a.y < b.y + b.height  &&
         a.y + a.height  > b.y;
}
function collides ( a , b ) { return a . x < b . x + b . width && a . x + a . width > b . x && a . y < b . y + b . height && a . y + a . height > b . y ; }
checks if two objects with x and y values are in contact
checks if two objects with x and y values are in contact