A basic collision detection program for html5 canvas