pub fn player_receive_item(state: &mut State, item: Item) -> String {
    state.player.inventory.add_item(item.clone());
    let item_message = format!("\nYou now have a {}\n", item.name);
    item_message
}
/// This function is used when the player is given an item.
/// This function is called by the events parser if the event
/// indicates that the player should receive an item.
This function is used when the player is given an item.
This function is called by the events parser if the event
indicates that the player should receive an item.
This function is used when the player is given an item . This function is called by the events parser if the event indicates that the player should receive an item .
pub fn player_receive_item(state: &mut State, item: Item) -> String {
    state.player.inventory.add_item(item.clone());
    let item_message = format!("\nYou now have a {}\n", item.name);
    item_message
}
pub fn player_receive_item ( state : & mut State , item : Item ) -> String { state . player . inventory . add_item ( item . clone ( ) ) ; let item_message = format ! ( " \n \n " item name ) ; item_message }
This function is used when the player is given an item.
This function is used when the player is given an item .
state
&mut State
item
Item
state
&mut State
item
Item