(self, matrix, x ,y, result, stop)
| 73 | return self.down(matrix, x, y+1, result, stop) |
| 74 | |
| 75 | def down(self, matrix, x ,y, result, stop): |
| 76 | if checkStop(matrix, x, y): |
| 77 | return result |
| 78 | while 1: |
| 79 | try: |
| 80 | # matrix |
| 81 | if matrix[y][x] == 'x': |
| 82 | raise IndexError |
| 83 | result.append(matrix[y][x]) |
| 84 | matrix[y][x] = 'x' |
| 85 | y += 1 |
| 86 | except IndexError: |
| 87 | y -= 1 |
| 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): |