mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
generate-alt-random: DECGRI: random repeat lengths
This commit is contained in:
parent
660a7f9345
commit
8ba455f70e
1 changed files with 5 additions and 1 deletions
|
|
@ -206,7 +206,11 @@ def main():
|
|||
for col in range(six_width):
|
||||
out.write(f'{random.choice(sixels)}')
|
||||
else:
|
||||
out.write(f'!{six_width}{random.choice(sixels)}')
|
||||
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
|
||||
|
||||
# Next line
|
||||
if band + 1 < band_count:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue