# Path: wordclock_plugins/tetris/brick.py
# class brick:
#     def __init__(self, layout, color):
#         self.layout = copy.deepcopy(layout)
#         self.color = color
#         self.outerHeight = len(layout)
#         self.outerWidth = len(layout[0])
# 
#         self.padTop = padTop(layout)
#         self.padBottom = padTop(layout[::-1])
#         rl = rot_left(layout)
#         self.padLeft = padTop(rl)
#         self.padRight = padTop(rl[::-1])
# 
#         self.innerHeight = self.outerHeight - self.padTop - self.padBottom
#         self.innerWidth = self.outerWidth - self.padLeft - self.padRight
# 
#     def clone(self):
#         return brick(self.layout, self.color)
# 
#     def rotate_cw(self):
#         return brick(rot_left(self.layout), self.color)
# 
#     def rotate_ccw(self):
#         return brick(rot_right(self.layout), self.color)


import os
import wordclock_tools.wordclock_colors as wcc
import random
import time
from .brick import brick
from time import sleep
from functools import reduce
# Authored by Markus E.
# https://github.com/mrksngl



class plugin:
    """
    A class to display some tetris
    """

    def __init__(self, config):
        """
        Initializations for the startup of the current wordclock plugin
        """
        # Get plugin name (according to the folder, it is contained in)
        self.name = os.path.dirname(__file__).split('/')[-1]
        self.pretty_name = "Tetris"
        self.description = "For the players."

        self.bg_color = wcc.BLACK;


# Path: wordclock_plugins/tetris/brick.py
# class brick:
#     def __init__(self, layout, color):
#         self.layout = copy.deepcopy(layout)
#         self.color = color
#         self.outerHeight = len(layout)
#         self.outerWidth = len(layout[0])
# 
#         self.padTop = padTop(layout)
#         self.padBottom = padTop(layout[::-1])
#         rl = rot_left(layout)
#         self.padLeft = padTop(rl)
#         self.padRight = padTop(rl[::-1])
# 
#         self.innerHeight = self.outerHeight - self.padTop - self.padBottom
#         self.innerWidth = self.outerWidth - self.padLeft - self.padRight
# 
#     def clone(self):
#         return brick(self.layout, self.color)
# 
#     def rotate_cw(self):
#         return brick(rot_left(self.layout), self.color)
# 
#     def rotate_ccw(self):
#         return brick(rot_right(self.layout), self.color)


# Path: wordclock_plugins/tetris/plugin.py
import os
import wordclock_tools.wordclock_colors as wcc
import random
import time
from .brick import brick
from time import sleep
from functools import reduce

# Authored by Markus E.
# https://github.com/mrksngl



class plugin:
    """
    A class to display some tetris
    """

    def __init__(self, config):
        """
        Initializations for the startup of the current wordclock plugin
        """
        # Get plugin name (according to the folder, it is contained in)
        self.name = os.path.dirname(__file__).split('/')[-1]
        self.pretty_name = "Tetris"
        self.description = "For the players."

        self.bg_color = wcc.BLACK;


        self.bricks = [brick([[0, 0, 0, 0],