fn send_prompt(&mut self, id: PlayerId) {
        // I'm not happy with this structure, but we always want to send a prompt after
        // a command invocation, so we just send a second message with the prompt. It is
        // more idiomatic than handling this in the command itself.
        if let Ok(player) = self.get_player(id) {
            self.send_event(
                id,
                GameEvent::Command(Response::Client(format!("{}", Prompt::from(player)))),
            )
        }
    }
/// Helper function for sending a prompt to the client.
Helper function for sending a prompt to the client.
Helper function for sending a prompt to the client .
fn send_prompt(&mut self, id: PlayerId) {
        // I'm not happy with this structure, but we always want to send a prompt after
        // a command invocation, so we just send a second message with the prompt. It is
        // more idiomatic than handling this in the command itself.
        if let Ok(player) = self.get_player(id) {
            self.send_event(
                id,
                GameEvent::Command(Response::Client(format!("{}", Prompt::from(player)))),
            )
        }
    }
fn send_prompt ( & mut self , id : PlayerId ) { // I'm not happy with this structure, but we always want to send a prompt after // a command invocation, so we just send a second message with the prompt. It is // more idiomatic than handling this in the command itself. if let Ok ( player ) = self . get_player ( id ) { self . send_event ( id , GameEvent :: Command ( Response :: Client ( format ! ( " " Prompt from ( player ) ) ) ) , ) } }
Helper function for sending a prompt to the client.
Helper function for sending a prompt to the client .
&mut self
id
PlayerId
&mut self
id
PlayerId