Answers for "python making player equipment"

1

python making player equipment

#  declare equipment as a dictionary
player_equip_dict = {
	"Helmet": "",
    "Right Hand": "",
    "Left Hand": "",
    "Chest": "",
    "Back": "",
    "Legs": "",
    "Feet": "",
}

#  assign an item to equipment
player_equip_dict.update({"Right Hand": "sword"})

#  remove an item from equipment
player_equip_dict.update({"Right Hand": ""})
Posted by: Guest on June-27-2021
1

python making player equipment

#  declare equipment as a dictionary
player_equip_dict = {
	"Helmet": "",
    "Right Hand": "",
    "Left Hand": "",
    "Chest": "",
    "Back": "",
    "Legs": "",
    "Feet": "",
}

#  assign an item to equipment
player_equip_dict.update({"Right Hand": "sword"})

#  remove an item from equipment
player_equip_dict.update({"Right Hand": ""})
Posted by: Guest on June-27-2021

Python Answers by Framework

Browse Popular Code Answers by Language