Created
April 20, 2019 02:16
-
-
Save ericdill/0c9aff06726f74efb70e702515a5a24c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
num_tiles = 10 | |
ret = [] | |
for _ in range(num_tiles): | |
x0 = random.randint(0, source_size[0] - target_width) | |
y0 = random.randint(0, source_size[1] - target_height) | |
x1 = x0 + target_width | |
y1 = y0 + target_height | |
ret.append((x0, x1, y0, y1)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment