Skip to content
Snippets Groups Projects
Commit 2bef2437 authored by rohieb's avatar rohieb
Browse files

python: add munching.py

parent 24f35743
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/python
import client
import random
import time
import clearscreen
if __name__=="__main__":
t = 0
s = 64
pixels = [0] * client.HEIGHT * client.WIDTH
clearscreen.clear()
while True:
if t == 63:
time.sleep(1)
t = (t+1) % 64
for x in range(client.WIDTH):
for y in range(client.HEIGHT):
#pixels[s * x + y] = 0 if (y == (x^t)) else 1
pixels[s * x + y] = 0 if ((x&y&t)) else 255
client.blit(0, 0, client.WIDTH, client.HEIGHT, pixels)
print t
#time.sleep(0.09)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment