accurately calculate maxdelay

This commit is contained in:
MaZderMind 2015-07-31 19:07:43 +02:00
parent 1e507de739
commit 32327b7b02

View file

@ -19,16 +19,18 @@ def introFrames(parameters):
targets = {} targets = {}
frames = 5*fps frames = 5*fps
maxdelay = int(frames/2) maxdelay = 0
for tile in tiles: for tile in tiles:
delay = rnd.randint(0, frames)
maxdelay = max(maxdelay, delay)
targets[tile] = ( targets[tile] = (
# x/y # x/y
rnd.randint(-1200, -800), rnd.randint(-1200, -800),
rnd.randint(-600, 600), rnd.randint(-600, 600),
# delay # delay
rnd.randint(0, maxdelay) delay
) )
# 5 Sekunde Kacheln zusammenbauen # 5 Sekunde Kacheln zusammenbauen