add multi user feature
This commit is contained in:
parent
1469a2fb16
commit
812394b611
|
@ -33,8 +33,23 @@ def randomnumber(pseed,pmin,pmax,v1,v2,v3):
|
|||
newseed=(int)(time.time()/60)
|
||||
seed=newseed
|
||||
|
||||
parts=4 #n users
|
||||
user=1 #1..n
|
||||
|
||||
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:
|
||||
starttime=time.time()
|
||||
commandsarray=[]
|
||||
|
@ -50,12 +65,7 @@ if __name__ == '__main__':
|
|||
print("xv="+str(xv)+ "yv="+str(yv))
|
||||
_current_command=""
|
||||
|
||||
pixelcoords=[]
|
||||
for _x in range(width):
|
||||
for _y in range(height):
|
||||
pixelcoords+=[(_x,_y)]
|
||||
|
||||
shuffle(pixelcoords)
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue