mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
generate-alt-random: DECGRI: don’t emit zero-length repeat sequences
This commit is contained in:
parent
8ba455f70e
commit
f3bc5a95b5
1 changed files with 3 additions and 3 deletions
|
|
@ -208,9 +208,9 @@ def main():
|
|||
else:
|
||||
pix_left = six_width
|
||||
while pix_left > 0:
|
||||
pix_count = random.randrange(pix_left + 1)
|
||||
out.write(f'!{pix_count}{random.choice(sixels)}')
|
||||
pix_left -= pix_count
|
||||
repeat_count = random.randrange(1, pix_left + 1)
|
||||
out.write(f'!{repeat_count}{random.choice(sixels)}')
|
||||
pix_left -= repeat_count
|
||||
|
||||
# Next line
|
||||
if band + 1 < band_count:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue