Exemplo n.º 1
0
 def __init__(self, N):
     self.shadow = None
     self.checkerboard = None
     self.boomlist = []
     m = Matrix()
     if N == 'easy':
         m.full(8, 8, u'■')
         self.print = m.copy
         self.creat_matrix(8, 10)
     self.run()
Exemplo n.º 2
0
 def one(self):
     res = NumMatrix()
     one = Matrix()
     empty = Matrix()
     res.full(12, 4, 0)
     one.full(12, 2, 1)
     empty.full(12, 1, 0)
     res.__putr(one)
     res.__putr(empty)
     for i in range(len(res.matrix)):
         for j in range(len(res.matrix[0])):
             if res.matrix[i][j] == 0:
                 res.matrix[i][j] = ' '
     self.matrix = res.matrix
Exemplo n.º 3
0
 def six(self):
     res = NumMatrix()
     one = NumMatrix()
     res.full(2, 6, 6)
     one.full(3, 2, 6)
     two = Matrix()
     two.full(3, 4, 0)
     one.__putr(two)
     three = NumMatrix()
     three.full(2, 6, 6)
     four = NumMatrix()
     four.full(3, 2, 6)
     five = Matrix()
     five.full(3, 2, 6)
     temp = Matrix()
     temp.full(3, 2, 0)
     four.__putr(temp)
     four.__putr(five)
     six = NumMatrix()
     six.full(2, 6, 6)
     res.__putd(one)
     res.__putd(three)
     res.__putd(four)
     res.__putd(six)
     empty = Matrix()
     empty.full(12, 1, 0)
     res.__putr(empty)
     for i in range(len(res.matrix)):
         for j in range(len(res.matrix[0])):
             if res.matrix[i][j] == 0:
                 res.matrix[i][j] = ' '
     self.matrix = res.matrix
Exemplo n.º 4
0
 def seven(self):
     res = NumMatrix()
     res.full(2, 6, 7)
     one = NumMatrix()
     one.full(10, 4, 0)
     two = Matrix()
     two.full(10, 2, 7)
     one.__putr(two)
     empty = Matrix()
     empty.full(12, 1, 0)
     res.__putd(one)
     res.__putr(empty)
     for i in range(len(res.matrix)):
         for j in range(len(res.matrix[0])):
             if res.matrix[i][j] == 0:
                 res.matrix[i][j] = ' '
     self.matrix = res.matrix
Exemplo n.º 5
0
 def love(num, printer=None):
     lover = MagicMatrix()
     op = assistfuction.Functions()
     one = Spmatrix()
     one.uper_ting(3, model=3)
     two = Matrix([[1], [1], [1]])
     three = Matrix([[0, 0, 0], [1, 0, 1], [1, 1, 1]])
     five = Spmatrix()
     five.uper_ting(3, model=2)
     five.T
     lover.get_matrix(op.split_matrix(one))
     lover.__putr(two)
     lover.__putr(three)
     lover.__putr(two)
     lover.__putr(five)
     add = Matrix()
     add.full(num, 11, 1)
     lover.__putd(add)
     six = Spmatrix()
     six.uper_ting(5, model=2)
     seven = Matrix([[1], [1], [1], [1], [1]])
     eight = Spmatrix()
     eight.uper_ting(5, model=1)
     eight.T
     temp2 = MagicMatrix()
     temp2.get_matrix(op.split_matrix(six))
     temp2.__putr(seven)
     temp2.__putr(eight)
     lover.__putd(temp2)
     end = Matrix([[0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0]])
     lover.__putd(end)
     for i in range(len(lover.matrix)):
         for j in range(len(lover.matrix[0])):
             if lover.matrix[i][j] == 0:
                 lover.matrix[i][j] = ' '
             else:
                 lover.matrix[i][j] = u'♥'
     if printer is not None:
         print('\033[31m', lover, '\033[0m')
     return lover.copy
Exemplo n.º 6
0
 def nine(self):
     res = NumMatrix()
     res.full(2, 6, 9)
     one = NumMatrix()
     one.full(3, 2, 9)
     two = Matrix()
     two.full(3, 2, 0)
     three = one.copy
     one.__putr(two)
     one.__putr(three)
     four = NumMatrix()
     four.full(2, 6, 9)
     five = NumMatrix()
     five.full(3, 4, 0)
     six = Matrix()
     six.full(3, 2, 9)
     five.__putr(six)
     seven = res.copy
     res.__putd(one)
     res.__putd(four)
     res.__putd(five)
     res.__putd(seven)
     empty = Matrix()
     empty.full(12, 1, 0)
     res.__putr(empty)
     for i in range(len(res.matrix)):
         for j in range(len(res.matrix[0])):
             if res.matrix[i][j] == 0:
                 res.matrix[i][j] = ' '
     self.matrix = res.matrix
Exemplo n.º 7
0
 def four(self):
     res = NumMatrix()
     res.full(5, 2, 4)
     one = Matrix()
     one.full(5, 2, 0)
     two = res.copy
     res.__putr(one)
     res.__putr(two)
     three = NumMatrix()
     three.full(2, 6, 4)
     four = NumMatrix()
     four.full(5, 4, 0)
     five = Matrix()
     five.full(5, 2, 4)
     four.__putr(five)
     empty = Matrix()
     empty.full(12, 1, 0)
     res.__putd(three)
     res.__putd(four)
     res.__putr(empty)
     for i in range(len(res.matrix)):
         for j in range(len(res.matrix[0])):
             if res.matrix[i][j] == 0:
                 res.matrix[i][j] = ' '
     self.matrix = res.matrix
Exemplo n.º 8
0
 def zero(self):
     res = NumMatrix()
     res.full(2, 6, 1)
     one = NumMatrix()
     one.full(8, 2, 1)
     two = Matrix()
     two.full(8, 2, 0)
     three = one.copy
     one.__putr(two)
     one.__putr(three)
     four = res.copy
     res.__putd(one)
     res.__putd(four)
     empty = Matrix()
     empty.full(12, 1, 0)
     res.__putr(empty)
     for i in range(len(res.matrix)):
         for j in range(len(res.matrix[0])):
             if res.matrix[i][j] == 0:
                 res.matrix[i][j] = ' '
             else:
                 res.matrix[i][j] = 0
     self.matrix = res.matrix