Return a (x, y) integer tuple of an empty space on the board.
(board, robots)
| 93 | |
| 94 | |
| 95 | def getRandomEmptySpace(board, robots): |
| 96 | """Return a (x, y) integer tuple of an empty space on the board.""" |
| 97 | while True: |
| 98 | randomX = random.randint(1, WIDTH - 2) |
| 99 | randomY = random.randint(1, HEIGHT - 2) |
| 100 | if isEmpty(randomX, randomY, board, robots): |
| 101 | break |
| 102 | return (randomX, randomY) |
| 103 | |
| 104 | |
| 105 | def isEmpty(x, y, board, robots): |
no test coverage detected