pub fn actions_complete(&self, night_actions: &[NightAction<P>]) -> bool {
        true && // required to make the if blocks parse as expressions for some reason
        if self.multiverse.role_alive(Role::Healer) {
            // all healer actions
            self.multiverse.alive().into_iter().all(|player_idx|
                night_actions.into_iter().any(|action| if let NightAction::Heal(ref src, _) = *action {
                    &self.secret_ids[player_idx] == src
                } else {
                    false
                })
            )
        } else { true } &&
        if self.multiverse.role_alive(Role::Detective) {
            // all detective investigations
            self.multiverse.alive().into_iter().all(|player_idx|
                night_actions.into_iter().any(|action| if let NightAction::Investigate(ref src, _) = *action {
                    &self.secret_ids[player_idx] == src
                } else {
                    false
                })
            )
        } else { true } &&
        // all werewolf kills
        self.multiverse.alive().into_iter().all(|player_idx|
            night_actions.into_iter().any(|action| if let NightAction::Kill(ref src, _) = *action {
                &self.secret_ids[player_idx] == src
            } else {
                false
            })
        )
    }
/// Returns `true` if no more night actions can be submitted.
Returns `true` if no more night actions can be submitted.
Returns ` true ` if no more night actions can be submitted .
pub fn actions_complete(&self, night_actions: &[NightAction<P>]) -> bool {
        true && // required to make the if blocks parse as expressions for some reason
        if self.multiverse.role_alive(Role::Healer) {
            // all healer actions
            self.multiverse.alive().into_iter().all(|player_idx|
                night_actions.into_iter().any(|action| if let NightAction::Heal(ref src, _) = *action {
                    &self.secret_ids[player_idx] == src
                } else {
                    false
                })
            )
        } else { true } &&
        if self.multiverse.role_alive(Role::Detective) {
            // all detective investigations
            self.multiverse.alive().into_iter().all(|player_idx|
                night_actions.into_iter().any(|action| if let NightAction::Investigate(ref src, _) = *action {
                    &self.secret_ids[player_idx] == src
                } else {
                    false
                })
            )
        } else { true } &&
        // all werewolf kills
        self.multiverse.alive().into_iter().all(|player_idx|
            night_actions.into_iter().any(|action| if let NightAction::Kill(ref src, _) = *action {
                &self.secret_ids[player_idx] == src
            } else {
                false
            })
        )
    }
pub fn actions_complete ( & self , night_actions : & [ NightAction < P > ] ) -> bool { true && // required to make the if blocks parse as expressions for some reason if self . multiverse . role_alive ( Role :: Healer ) { // all healer actions self . multiverse . alive ( ) . into_iter ( ) . all ( | player_idx | night_actions . into_iter ( ) . any ( | action | if let NightAction :: Heal ( ref src , _ ) = * action { & self . secret_ids [ player_idx ] == src } else { false } ) ) } else { true } && if self . multiverse . role_alive ( Role :: Detective ) { // all detective investigations self . multiverse . alive ( ) . into_iter ( ) . all ( | player_idx | night_actions . into_iter ( ) . any ( | action | if let NightAction :: Investigate ( ref src , _ ) = * action { & self . secret_ids [ player_idx ] == src } else { false } ) ) } else { true } && // all werewolf kills self . multiverse . alive ( ) . into_iter ( ) . all ( | player_idx | night_actions . into_iter ( ) . any ( | action | if let NightAction :: Kill ( ref src , _ ) = * action { & self . secret_ids [ player_idx ] == src } else { false } ) ) }
Returns `true` if no more night actions can be submitted.
Returns ` true ` if no more night actions can be submitted .
&self
night_actions
&[NightAction<P>]
&self
night_actions
&[NightAction<P>]