2021年4月24日星期六

Q: How do you select a random dictionary in Python 3?

I'm trying to make a little RPG text battle and I'm trying to get the enemy to randomly chose between one of the 2 hero's to attack. However, I don't know how to get the enemy bot to chose from one of the 2 dictionaries. I also want them to chose whether to do a normal attack or a special attack, but I don't know how to work around with that. How should I set up the code to be able to take an if,then statement from that's not too complex?

https://stackoverflow.com/questions/67248866/q-how-do-you-select-a-random-dictionary-in-python-3 April 25, 2021 at 09:08AM

没有评论:

发表评论