(self, matrix, x, y, result, stop)
| 88 | return self.left(matrix, x-1, y, result, stop) |
| 89 | |
| 90 | def left(self, matrix, x, y, result, stop): |
| 91 | if checkStop(matrix, x, y): |
| 92 | return result |
| 93 | while 1: |
| 94 | try: |
| 95 | # matrix |
| 96 | if matrix[y][x] == 'x' or x < 0: |
| 97 | raise IndexError |
| 98 | result.append(matrix[y][x]) |
| 99 | matrix[y][x] = 'x' |
| 100 | x -= 1 |
| 101 | except IndexError: |
| 102 | x += 1 |
| 103 | return self.up(matrix, x, y-1, result, stop) |
| 104 | |
| 105 | def up(self, matrix, x, y, result, stop): |
| 106 | if checkStop(matrix, x, y): |