mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -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:
|
else:
|
||||||
pix_left = six_width
|
pix_left = six_width
|
||||||
while pix_left > 0:
|
while pix_left > 0:
|
||||||
pix_count = random.randrange(pix_left + 1)
|
repeat_count = random.randrange(1, pix_left + 1)
|
||||||
out.write(f'!{pix_count}{random.choice(sixels)}')
|
out.write(f'!{repeat_count}{random.choice(sixels)}')
|
||||||
pix_left -= pix_count
|
pix_left -= repeat_count
|
||||||
|
|
||||||
# Next line
|
# Next line
|
||||||
if band + 1 < band_count:
|
if band + 1 < band_count:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue