Ejemplo n.º 1
0
def test4():
    matrix = part1.createMatrix(4, 4)
    part1.executeInstruction(matrix, [1,0,0,0,3])
    part1.executeInstruction(matrix, [-1,0,0,3,0])
    print('first column is turned on except origin: ' + str(isLit(matrix, 0,0,0,3) == 3))
    print('first row is turned on except origin: ' + str(isLit(matrix, 0,0,3,0) == 3))
    print(str(len(matrix)))
Ejemplo n.º 2
0
def test3():
    matrix = part1.createMatrix(4,4)
    part1.executeInstruction(matrix, [1,0,0,0,3])
    print('first column was turned on: ' + str(isLit(matrix, 0,0,0,3) == 4))
    print('second column is still off: ' + str(isLit(matrix, 1,0,1,3) == 0))