Struct twt_werewolf_master_ng::player::Player
source · pub struct Player {
cli: Client,
id: u64,
username: String,
role: Box<dyn Role>,
}
Fields§
§cli: Client
§id: u64
§username: String
§role: Box<dyn Role>
Implementations§
source§impl Player
impl Player
pub fn new() -> Self
fn wait_connect(&mut self)
fn reply_username(&mut self)
fn map_role(s: String) -> Box<dyn Role>
fn get_role(&mut self)
pub fn init(self)
sourcefn check_death(role: &mut Box<dyn Role>, cli: &mut Client)
fn check_death(role: &mut Box<dyn Role>, cli: &mut Client)
检查死亡。为了处理多个死亡的情形已经方便死亡提示,当收到开始信号后再进行死亡动作,其它消息直接输出。
fn play(&mut self)
Auto Trait Implementations§
impl Freeze for Player
impl !RefUnwindSafe for Player
impl !Send for Player
impl !Sync for Player
impl Unpin for Player
impl !UnwindSafe for Player
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more