scripts: generate-alt-random-writes: don’t re-use ‘count’ variable

This commit is contained in:
Daniel Eklöf 2020-11-14 13:46:10 +01:00
parent 168ceaa927
commit 2639e7d2e2
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -57,9 +57,9 @@ def main():
bottom = rand.read(1)[0] % 3
out.write(f'\033[{top};{lines - bottom}r')
count = rand.read(1)[0] % (lines - 1)
lines_to_scroll = rand.read(1)[0] % (lines - 1)
rev = rand.read(1)[0] % 2
out.write(f'\033[{count + 1}{"T" if rev == 1 else "S"}')
out.write(f'\033[{lines_to_scroll + 1}{"T" if rev == 1 else "S"}')
continue
# Generate a random location and a random character