Mar-17-2019, 01:53 PM
I am still stuck on the dice game I am doing. I was able to get the player and AI into my code, but now I am confused on how to actually get the game into powershell. When I run the program, it throws no errors, but does not do anything. Also, I do not think I did the while loop wrong.
import random
def die():
self.sides = num_sides
self.set_value(val)
player = random.randit(1,6)
ai=random.randit(1,6)
print('you have rolled' + str(player))
if player > ai:
print('you win')
else:
print('you lost')
print('the computer rolled'+str(ai))
while True:
print('please reroll die')
