// calculate movement
carLeftEdge += changeInCarPos;
if (carLeftEdge < 0)
carLeftEdge = 0;
else if (carLeftEdge > (PLAYERAWIDTH - BLOCKSIZE))
carLeftEdge = PLAYAREAWIDTH - BLOCKSIZE;
randomDiceThrow = Math.random();
if (roadDiceThrow < ROADGOESLEFT) changeInCarPos = -ANIMDELTA;
else if (randomDiceThrow >= ROADGOESRIGHT) changeInCarPos = ANIMDELTA;
else changeInCarPos
changedLeftRoadEdge += changeInRoadPos;
if (changedLeftRoadEdge < 0)
changedLeftRoadEdge = 0;
else if (changedLeftRoadEdge > PLAYAREAWIDTH - ROADWIDTH)
changedLeftRoadEdge = PLAYAREAWIDTH - ROADWIDTH;
for (roadPiece = NUMROADPIECES - 1; r)