예제 #1
0
파일: 9-14.py 프로젝트: vanskie/Python
from dice import Die

while True:
    current = Die()

    die = input('What kind of die do you want: ')
    if die == 'q':
        break
    times = input('How many times do you want to roll the die: ')
    if times == 'q':
        break

    if die == '':
        current.roll_dice(int(times))
    else:
        current.sides = int(die)
        current.roll_dice(int(times))

예제 #2
0
from dice import Die

first = Die()
first.roll_dice(10)