from schoginitoys import *
while True:
display_reset()
top_row, bottom_row = 0, 7
left_col, right_col = 0, 31
while top_row <= bottom_row and left_col <= right_col:
# Fill top row from left to right
for i in range(left_col, right_col + 1):
display.pixel(i, top_row, 1)
display.show()
time.sleep(0.05)
# Fill rightmost column from top to bottom
for i in range(top_row + 1, bottom_row + 1):
display.pixel(right_col, i, 1)
display.show()
time.sleep(0.05)
# Fill bottom row from right to left
for i in range(right_col - 1, left_col - 1, -1):
display.pixel(i, bottom_row, 1)
display.show()
time.sleep(0.05)
# Fill leftmost column from bottom to top
for i in range(bottom_row - 1, top_row, -1):
display.pixel(left_col, i, 1)
display.show()
time.sleep(0.05)
# Move inward
top_row += 1
bottom_row -= 1
left_col += 1
right_col -= 1