(x, y)
| 44 | (x-1, y)] |
| 45 | |
| 46 | def right(x, y): |
| 47 | |
| 48 | while 1: |
| 49 | if not current_value: |
| 50 | return maps |
| 51 | xy = makeXY(x, y) |
| 52 | if (y > -1 and x > -1) and (y < n and x < n): |
| 53 | if maps[y][x] == 0: |
| 54 | maps[y][x] = current_value.pop() |
| 55 | y, x = xy[2][1], xy[2][0] |
| 56 | else: |
| 57 | # down |
| 58 | return down(x-1, y+1) |
| 59 | else: |
| 60 | # down |
| 61 | return down(x-1, y+1) |
| 62 | |
| 63 | def down(x, y): |
| 64 |