'''Sequence that will be shown to a user, sequence of blocks'''
# this class is made entirely for the screen with width = 1000 and height = 800

from Block import Block

class Sequence:
    '''Sequence class defines the main functions that will be used by a sequence'''

    # constructor to initiate the sequence
    # i -- the number of sequence that the researcher is using (1-4)
    def __init__(self, i):
        self.i = i
        self.sequence = []
    
    def create_sequence(self):
        '''this method creates one of four standard sequences depending on the given parameter i'''
        if (self.i == 1):
            #creating Blocks and locating them on the screen
            pressed = False
            block1 = Block(400, 120, 50, pressed)
            block2 = Block(100, 100, 50, pressed)
            block3 = Block(600, 150, 50, pressed)
            block4 = Block(125, 300, 50, pressed)
            block5 = Block(425, 315, 50, pressed)
            block6 = Block(625, 335, 50, pressed)
            block7 = Block(60, 450, 50, pressed)
            block8 = Block(450, 580, 50, pressed)
            block9 = Block(550, 550, 50, pressed)

            #putting the created blocks into a list for keeping the sequence
            self.sequence = [block1, block2, block3, block4, block5, block6, block7, block8, block9]
        #elif (self.i == 2):
        #elif (self.i == 3):
        #elif (self.i == 4):
        else:
            print("Researcher does not know how to use this program. Error.")

    def draw_sequence(self, screen, event):
        '''this method draws the created sequence'''
        for block in self.sequence:
            block.clicked(screen, event)