Last active
November 21, 2021 17:58
-
-
Save DynamicField/8e4d4fbc18659954ef35add6cffbf418 to your computer and use it in GitHub Desktop.
plickers loul
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
import kandinsky | |
def plickers(): | |
cells = [ | |
1, 1, 1, 1, 1, | |
1, 1, 1, 1, 1, | |
0, 1, 0, 1, 1, | |
1, 1, 1, 1, 1, | |
1, 1, 1, 0, 1 | |
] | |
start_x = 53 | |
end_x = 273 | |
start_y = 0 | |
end_y = 226 | |
cell_width = (end_x - start_x) // 5 | |
cell_height = (end_y - start_y) // 5 | |
for row in range(5): | |
for column in range(5): | |
if cells[row * 5 + column]: | |
kandinsky.fill_rect(start_x + cell_width * column, | |
start_y + cell_height * row, | |
cell_width, | |
cell_height, | |
kandinsky.color(0, 0, 0)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment