def __str__(self): output = Output() output.thick_bar() output.add('Found {} words ({} points available)'.format( len(self.words), self._calc_points())) words_by_length = self._make_dict() for length in words_by_length: output.thin_bar() output.add('{}: {}'.format(length, ' '.join(words_by_length[length]))) output.thick_bar() return str(output)
def __str__(self): output = Output() output.thick_bar(13) output.add('| |') for row in self._letters: output.add('| ' + ' '.join(row) + ' |') output.add('| |') output.thick_bar(13) return str(output)