In python, import roller, and run roller.main(). It will produce an initial
window like this:
|
After you click on the roll button, you'll see something like this:
|
Important Note: The first roll is done for you. In other words the dice come out with different, random values on them. This is a little different than the roller example where they all started at 1. You'll have to call the right button method to do this, after you have created them of course, but before the while loop.
pt = win.getMouse()
while not (roll1 and roll2): # if both are True, condition is False
The program gets the next mouseclick, and processes it,
as long as roll1 and roll2 are not both True.
The body of the while loop is a big if-elif-else statement.
This homework is due Tuesday Nov 21 at midnight.
After putting the documentation in (at the top and throughout), submit it by typingsubmit homework9 roller.py