pub fn role(&self, player: &P) -> Option<Role> {
        match *self {
            State::Signups(_) => None,
            State::Night(ref night) => night.multiverse.role(night.secret_ids.iter().position(|iter_player| player == iter_player).expect("no such player")),
            State::Day(ref day) => day.multiverse.role(day.secret_ids.iter().position(|iter_player| player == iter_player).expect("no such player")),
            State::Complete(_) => None
        }
    }
/// Returns the role of the given player, if that role is unambiguous.
Returns the role of the given player, if that role is unambiguous.
Returns the role of the given player if that role is unambiguous .
pub fn role(&self, player: &P) -> Option<Role> {
        match *self {
            State::Signups(_) => None,
            State::Night(ref night) => night.multiverse.role(night.secret_ids.iter().position(|iter_player| player == iter_player).expect("no such player")),
            State::Day(ref day) => day.multiverse.role(day.secret_ids.iter().position(|iter_player| player == iter_player).expect("no such player")),
            State::Complete(_) => None
        }
    }
pub fn role ( & self , player : & P ) -> Option < Role > { match * self { State :: Signups ( _ ) => None , State :: Night ( ref night ) => night . multiverse . role ( night . secret_ids . iter ( ) . position ( | iter_player | player == iter_player ) . expect ( " " ) ) , State :: Day ( ref day ) => day . multiverse . role ( day . secret_ids . iter ( ) . position ( | iter_player | player == iter_player ) . expect ( " " ) ) , State :: Complete ( _ ) => None } }
Returns the role of the given player, if that role is unambiguous.
Returns the role of the given player if that role is unambiguous .
&self
player
&P
&self
player
&P