Merge branch 'master' of repos.ctdo.de:ctdo/pixelflut

This commit is contained in:
RvdBongard 2018-03-31 23:15:34 +02:00
commit bd52a6ccb9
1 changed files with 15 additions and 5 deletions

View File

@ -33,8 +33,23 @@ def randomnumber(pseed,pmin,pmax,v1,v2,v3):
newseed=(int)(time.time()/60) newseed=(int)(time.time()/60)
seed=newseed seed=newseed
parts=4 #n users
user=1 #1..n
if __name__ == '__main__': if __name__ == '__main__':
pixelcoords=[]
for _x in range(width):
for _y in range(height):
pixelcoords+=[(_x,_y)]
random.seed(42)
random.shuffle(pixelcoords)
print(pixelcoords)
pixelcoords=pixelcoords[int(len(pixelcoords)/parts)*(user-1):int(len(pixelcoords)/parts)*(user)]
while True: while True:
starttime=time.time() starttime=time.time()
commandsarray=[] commandsarray=[]
@ -50,12 +65,7 @@ if __name__ == '__main__':
print("xv="+str(xv)+ "yv="+str(yv)) print("xv="+str(xv)+ "yv="+str(yv))
_current_command="" _current_command=""
pixelcoords=[]
for _x in range(width):
for _y in range(height):
pixelcoords+=[(_x,_y)]
shuffle(pixelcoords)