I'm writing a text based adventure game and was wondering if there was a way to "Roll Dice". An example of what i am trying to use this for would be attacking or defending in the game. If they get above or equal to a certain number It would be considered a hit. I would also need this same automated dice rolling for the enemies in the game.
Thanks
Matt.
Search Result
Collapse
2 results in 0.0045 seconds.
Keywords
Members
Tags
-
How do you simulate a dice roll in python?
-
Is there something similar to GOTO in python?
So I'm trying to write a text based adventure game and there are going to be points where you'll have to travel back to previous rooms. I wasn't really sure of the best way to go about this. Also along the way you'll collect 3 keys and various loot. any help would be great. thanks -Matt
...Code:#Doors test def main(): endprogram = 'no' while endprogram == "no"