#NEWLINE# def process( self , time_passed ) : #NEWLINE# #INDENT# self . brain . think ( ) #NEWLINE# if ( ( self . speed > 0 ) and ( self . location != self . destination ) ) : #NEWLINE# #INDENT# vec_to_destination = ( self . destination - self . location ) #NEWLINE# distance_to_destination = vec_to_destination . get_length ( ) #NEWLINE# heading = vec_to_destination . get_normalized ( ) #NEWLINE# travel_distance = min ( distance_to_destination , ( time_passed * self . speed ) ) #NEWLINE# self . location += ( travel_distance * heading )