Behaviour function ( ) { while ( readyBehaviours . isEmpty ( ) ) { owner . idle ( ) ; } Behaviour loc0 = ( Behaviour ) readyBehaviours . get ( currentIndex ) ; currentIndex = ( currentIndex + 1 ) % readyBehaviours . size ( ) ; return loc0 ; }
selects the appropriate behaviour for execution , with a trivial round-robin algorithm . concode_field_sep Agent owner concode_elem_sep List readyBehaviours concode_elem_sep List blockedBehaviours concode_elem_sep int currentIndex concode_field_sep void add concode_elem_sep Behaviour[] getBehaviours concode_elem_sep boolean removeFromBlocked concode_elem_sep void restartAll concode_elem_sep void restart concode_elem_sep void setBehaviours concode_elem_sep boolean removeFromReady concode_elem_sep void block concode_elem_sep void remove