use crate::base::sample;
use crate::locale::fetch_locale;
pub fn name() -> String {
fetch_locale("creature.horse.name", "en")
.map(|v| sample(&v))
.unwrap_or_else(|| "Noir".to_string())
}
pub fn breed() -> String {
fetch_locale("creature.horse.breed", "en")
.map(|v| sample(&v))
.unwrap_or_else(|| "Arabian".to_string())
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_horse_generation() {
assert!(!name().is_empty());
assert!(!breed().is_empty());
}
}