Skip to content

Instantly share code, notes, and snippets.

@DynamicField
Last active November 21, 2021 17:58
Show Gist options
  • Save DynamicField/8e4d4fbc18659954ef35add6cffbf418 to your computer and use it in GitHub Desktop.
Save DynamicField/8e4d4fbc18659954ef35add6cffbf418 to your computer and use it in GitHub Desktop.
plickers loul
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