import time
from Displays import *
from Lights import *
from Buzzer import *


"""
In this Tutorial exercise, we are going to build a little Dice Gadget
At the minimum, it should roll and show a number of lights on 
representing the number it rolled.

Leraning objectives:

1. Using lists
2. Creating a subclass of a class
3. Using loops 
4. Expressing logic.


Step 1. Review the classes and do a quick assessment of what classes we have
Light and Dimlight, Buzzer, PassiveBuzzer and ActiveBuzzer, Display and LCDDisplay
- the above classes we have already seen.
We see two new classes today - CompositeLights and TrafficLight.
"""


"""
Step 2. Test some basic creating classes and calling methods.
We are going to create a class called DiceGadget in this application, and it will need
to use the 6 LEDs you see here, 2 buttons - we can call them roll and run. This will 
use the Dice model class that we created earlier.

Step 2A. Create the DiceGadget class, and the constructor to set up all the hardware, and a test
method to check one or 2 things, say turn on a couple LEDs, beep the buzzer, 
and show something on the display.

Step 2B. Add the Button handlers to the Dice class for the roll and run buttons. 
Put something on the display when these buttons are pushed to start with to 
test the handlers.
"""

"""
Step 3. Subclassing the compositeclass.
Turn the DiceGadget class into a subclass of the CompositeLight class.
Le'ts use the compositelights class as a basis for building our dice. examine 
that class and see what it has. We use the array to store our 6 lights.
"""

"""
Step 4. Create the a method that shows the result of a Dice roll. 
You should make use of the model here, so the model takes care of finding
the numeric result of the roll, and the gadget displays it. Let's try to make it 
look nice so if a 5 is rolled, it lights up 5 LEDs, and show something like 
You rolled 5 on the display.
"""

"""
Step 5. Animate the roll.
Let's do a fancy roll - if time permits. When the Green run button is
pushed, we are going to animate the LEDs, and when the green button
is pressed again, it should stop on whichever light it was last on.
"""




if __name__ == '__main__':
  print('Program started')
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT