- empty = -10
- lines = 0
- if not continuations:
- maxlen = 0
- # want at least two lines, but let Lesmianator end his stanzas
- while (empty < 2 or lines < 2) and maxlen:
- letter = choose_word(word, continuations)
+
+ finished_stanza_verses = 0
+ current_stanza_verses = 0
+ verse_start = True
+
+ char_count = 0
+
+ # do `min_lines' non-empty verses and then stop,
+ # but let Lesmianator finish his last stanza.
+ while finished_stanza_verses < min_lines and char_count < maxlen:
+ letter = cls.choose_letter(word, continuations)