// evaluate the following lines step by step by selecting an
// expression and press CMD or Ctrl + d
// Morphs have a name
car = $morph('Car');
show(car)
// we can add methods to morphs
car.addScript(function drive() {
this.moveBy(pt(10, 0))
})
// evaluate to move the car a bit
car.drive()
// we enhance the drive method so that the car will not leave the visble bounds
car.addScript(function drive() {
if (this.world().visibleBounds().containsRect(this.bounds()))
this.moveBy(pt(10, 0))
})
// now we let the car drive alone
car.startStepping(60/*ms*/, 'drive')
// stop it!
car.stopStepping()
// Can you extend drive() so that the car turns when it reaches a border?