use uuid::Uuid; use std::iter; use construct::{Construct}; use names::{name}; use player::{Player}; pub fn generate_mob() -> Construct { let mob = Construct::new() .named(&name()); return mob; } pub fn instance_mobs(player_id: Uuid) -> Vec { iter::repeat_with(|| generate_mob() .set_account(player_id)) // .learn(Skill::Attack)) .take(3) .collect::>() } pub fn bot_player() -> Player { let bot_id = Uuid::new_v4(); let constructs = instance_mobs(bot_id); Player::new(bot_id, &name(), constructs).set_bot(true) }