[F] Fix random count being negative when screen is too small

This commit is contained in:
Hykilpikonna 2022-11-10 22:24:38 -05:00
parent 3770e58e66
commit ed3bb65824
No known key found for this signature in database
GPG key ID: 256CD01A41D7FA26

View file

@ -291,7 +291,7 @@ def create_config() -> Config:
while len(pis) < len(slots):
pis += pis
perm = {p[:len(slots)] for p in permutations(pis)}
random_count = ascii_per_row * ascii_rows - len(arrangements)
random_count = max(0, ascii_per_row * ascii_rows - len(arrangements))
if random_count > len(perm):
choices = perm
else: