You could add a brake function, so we can react to obstacle, the object could remain to speed the most time at max speed for maximun score.