(self, matrix, x, y, result, stop)
| 57 | |
| 58 | class Solution(object): |
| 59 | def right(self, matrix, x, y, result, stop): |
| 60 | if checkStop(matrix, x, y): |
| 61 | return result |
| 62 | while 1: |
| 63 | try: |
| 64 | # matrix |
| 65 | if matrix[y][x] == 'x': |
| 66 | raise IndexError |
| 67 | result.append(matrix[y][x]) |
| 68 | matrix[y][x] = 'x' |
| 69 | x += 1 |
| 70 | |
| 71 | except IndexError: |
| 72 | x -= 1 |
| 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): |
no test coverage detected