Ejemplo n.º 1
0
    def insert_new_moving_piece(self, template):
        if template == DUCK_INDICES:
            for obs in self.observers:
                obs.notify(QuackEvent())

        part = Part(template, self.column_nr)
        part.position_index = self.column_nr / 2 - 1
        part.rotate(random.randint(0, 3), clockwise=True)

        self.moving_piece = part