(x, y)
| 78 | # left |
| 79 | return left(x-1, y-1) |
| 80 | def left(x, y): |
| 81 | |
| 82 | while 1: |
| 83 | if not current_value: |
| 84 | return maps |
| 85 | xy = makeXY(x, y) |
| 86 | |
| 87 | if y > -1 and x > -1 and y < n and x < n: |
| 88 | if maps[y][x] == 0: |
| 89 | maps[y][x] = current_value.pop() |
| 90 | y, x = xy[3][1], xy[3][0] |
| 91 | else: |
| 92 | # up |
| 93 | return up(x+1, y-1) |
| 94 | else: |
| 95 | # up |
| 96 | return up(x+1, y-1) |
| 97 | def up(x, y): |
| 98 | |
| 99 | while 1: |