(x, y, result=0)
| 59 | y_length = len(court) |
| 60 | |
| 61 | def helper(x, y, result=0): |
| 62 | nonlocal court |
| 63 | Xy = makeAroundXY(x, y) |
| 64 | for i in Xy: |
| 65 | try: |
| 66 | if i[0] < 0 or i[1] < 0: |
| 67 | continue |
| 68 | |
| 69 | if court[i[1]][i[0]] == 1: |
| 70 | court[i[1]][i[0]] = 0 |
| 71 | result += 1 |
| 72 | t = helper(i[0], i[1], 0) |
| 73 | result += t |
| 74 | except IndexError: |
| 75 | continue |
| 76 | else: |
| 77 | return result |
| 78 | |
| 79 | |
| 80 | for y in range(y_length): |
no test coverage detected