רובוטראפיק/ControlSpeed
מראה
#define SPEED_ZERO 0x0200
void ControlSpeed()
{
uiSpeed = SPEED_ZERO + 0x0090 ; // max speed;
if( 0 == IsOnBlack(sc) ) // not on roud (black)
uiSpeed =SPEED_ZERO + 0x0080;
if( 1 == IsCollision())
uiSpeed = SPEED_ZERO;
}