pub fn faction(&self, player_idx: usize) -> Option<Faction> {
        let faction = self.0[0].factions[player_idx];
        if self.0[1..].iter().all(|universe| universe.factions[player_idx] == faction) {
            Some(faction)
        } else {
            None
        }
    }
/// Returns the faction of the given player, if that faction is unambiguous.
Returns the faction of the given player, if that faction is unambiguous.
Returns the faction of the given player if that faction is unambiguous .
pub fn faction(&self, player_idx: usize) -> Option<Faction> {
        let faction = self.0[0].factions[player_idx];
        if self.0[1..].iter().all(|universe| universe.factions[player_idx] == faction) {
            Some(faction)
        } else {
            None
        }
    }
pub fn faction ( & self , player_idx : usize ) -> Option < Faction > { let faction = self . 0 [ 0 ] . factions [ player_idx ] ; if self . 0 [ 1 .. ] . iter ( ) . all ( | universe | universe . factions [ player_idx ] == faction ) { Some ( faction ) } else { None } }
Returns the faction of the given player, if that faction is unambiguous.
Returns the faction of the given player if that faction is unambiguous .
&self
player_idx
usize
&self
player_idx
usize