Beispiel #1
0
    def test_findResult(self):
        matrix = [[60, 25, 53, 61, 14, 71], [54, 19, 19, 25, 59, 70], [69, 45, 72, 27, 19, 19], [6, 38, 47, 90, 42, 56], [0, 58, 56, 96, 85, 14], [72, 41, 100, 26, 83, 91]]
        Grid_Hack.SIZE = len(matrix)
        cellArray = Grid_Hack.sort(matrix)
        rowArray, colArray, diag1Array, diag2Array = Grid_Hack.createLists()
        result = Grid_Hack.findResult(cellArray, rowArray, colArray, diag1Array, diag2Array)
        self.assertEqual(result, {'mul_value': 57970785600L, 'cells': [(5, 2, 8, 7, 100), (5, 5, 5, 10, 91), (5, 4, 6, 9, 83), (5, 0, 10, 5, 72), (5, 1, 9, 6, 41), (5, 3, 7, 8, 26)], 'index': 5, 'label': 'row'}
)