pub fn execute_packed_instance_action(&mut self, action: String) {
        if let Some(action) = serde_json::from_str::<PlayerAction>(&action).ok() {
            if let Some(index) = self.player_ids_inst_indices.get(&action.player_id) {
                self.instances[*index].action = Some(action);
            }
        }
    }
/// Assign an action to an instance
Assign an action to an instance
Assign an action to an instance
pub fn execute_packed_instance_action(&mut self, action: String) {
        if let Some(action) = serde_json::from_str::<PlayerAction>(&action).ok() {
            if let Some(index) = self.player_ids_inst_indices.get(&action.player_id) {
                self.instances[*index].action = Some(action);
            }
        }
    }
pub fn execute_packed_instance_action ( & mut self , action : String ) { if let Some ( action ) = serde_json :: from_str :: < PlayerAction > ( & action ) . ok ( ) { if let Some ( index ) = self . player_ids_inst_indices . get ( & action . player_id ) { self . instances [ * index ] . action = Some ( action ) ; } } }
Assign an action to an instance
Assign an action to an instance
&mut self
action
String
&mut self
action
String