Started writing collision detection