var engine = function () {
if ( (offsetTop === 0 && offsetLeft <= 200) || (offsetTop < 200 && offsetLeft === 200) ){
moveHeading();
}
else if ( (offsetTopReverse === 200 && offsetLeftReverse <= 200) || (offsetTopReverse <= 200 && offsetLeftReverse === 0) &&
( offsetTopReverse != 0 || offsetLeftReverse != 0 ) ){
moveHeadingReverse();
console.log("reverse");
console.log(offsetTopReverse,offsetLeftReverse);
} else if ( offsetTopReverse === 0 && offsetLeftReverse === 0) {
offsetLeft = 0;
offsetTop = 0;
offsetLeftReverse = 200;
offsetTopReverse = 200;
}
}