pub fn random_occupant<R: Rng>(&self, rng: &mut R, tile: &Tile) -> Option<Occupant> {
        let percentage = (self.occupant_chance * 100.0) as u64;
        if tile.name() == "floor" && odds(rng, percentage, 100) {
            Some(self.occupants.choose(rng).clone())
        } else {
            None
        }
    }
// generate a random occupant on this tile if it is empty.
generate a random occupant on this tile if it is empty.
generate a random occupant on this tile if it is empty .
pub fn random_occupant<R: Rng>(&self, rng: &mut R, tile: &Tile) -> Option<Occupant> {
        let percentage = (self.occupant_chance * 100.0) as u64;
        if tile.name() == "floor" && odds(rng, percentage, 100) {
            Some(self.occupants.choose(rng).clone())
        } else {
            None
        }
    }
pub fn random_occupant < R : Rng > ( & self , rng : & mut R , tile : & Tile ) -> Option < Occupant > { let percentage = ( self . occupant_chance * 100.0 ) as u64 ; if tile . name ( ) == " " && odds ( rng , percentage , 100 ) { Some ( self . occupants . choose ( rng ) . clone ( ) ) } else { None } }
generate a random occupant on this tile if it is empty.
generate a random occupant on this tile if it is empty .
&self
rng
&mut R
tile
&Tile