Exemplo n.º 1
0
    def __init__(self, root=None, X_MAX=10, Y_MAX=10):
        """
        Constructor

        root - reference to the wdiget containing this widget
        """
        Frame.__init__(self, root)

        cells = []
        for x in range(0, X_MAX):
            cols = []
            for y in range(0, Y_MAX):
                cell = CellWidget(master=self, width=C_SIZE, height=C_SIZE)
                cell.grid(row=x, column=y)
                cols.append(cell)
            cells.append(cols)

        GolGrid.__init__(self, cells)