public void update() {
    	if(checkDead())
    		return;
    	
    	if(controller != null)
    		controller.update();
    	
    	double leftThreshold = targetAngle - turningSpeed;
//    	if(leftThreshold < 0)
//    	    leftThreshold += THREE_SIXTY_DEGREES;
    	
    	double rightThreshold = targetAngle + turningSpeed;
//    	if(rightThreshold > THREE_SIXTY_DEGREES)
//    	    rightThreshold -= THREE_SIXTY_DEGREES;
    	
    	//if we're close enough to the target so don't move to stop jerking
       	if (!(angle > leftThreshold && angle < rightThreshold)) {
	
    	    if (clock > 0) {
        		angle += turningSpeed;
        		angle %= THREE_SIXTY_DEGREES;
    	    } 
    	    else {
        		angle -= turningSpeed;
    
        		if (angle < 0)
        		    angle += THREE_SIXTY_DEGREES;
    	    }
    	}

    	velocity -= deceleration;

    	if(velocity < maxVelocity) {
    	    velocity += acceleration;

    	    if(velocity > maxVelocity)
        		velocity = maxVelocity;
    	}
	
    	if(velocity < 0)
    	    velocity = 0;

    	x += velocity*Math.sin(angle);
    	y += velocity*Math.cos(angle);
    }