You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
437 B
24 lines
437 B
1 year ago
|
from listwork import *
|
||
|
from random import randint as ri
|
||
|
|
||
|
# pas2( fill(...) ) -> 1/2
|
||
|
def pas2(pxls):
|
||
|
new_pxls = []
|
||
|
|
||
|
pas = False
|
||
|
for i in pxls:
|
||
|
if not pas:
|
||
|
new_pxls.append(i)
|
||
|
pas = True
|
||
|
else:
|
||
|
pas = False
|
||
|
return new_pxls
|
||
|
|
||
|
# rand(x1,y1, x2,y2) -> draw() or pas2()
|
||
|
def rand(x1,y1, x2,y2):
|
||
|
pxls = []
|
||
|
for x in range(x1, x2 +1):
|
||
|
for y in range(y1, y2 +1):
|
||
|
pxls.append([x,y, ri(0,255), ri(0,255), ri(0,255)])
|
||
|
return pxls
|