From a7717b04d64b5db88193500ac67864b23c0873b2 Mon Sep 17 00:00:00 2001 From: samerbam Date: Wed, 23 Aug 2023 20:11:05 -0400 Subject: [PATCH] add 2 words to word search, move sudoku solution under sudoku --- application/thermal_print.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/application/thermal_print.py b/application/thermal_print.py index a14d204..de61a5c 100644 --- a/application/thermal_print.py +++ b/application/thermal_print.py @@ -133,10 +133,11 @@ class ThermalPrinter(): sudokus = generate_sudoku() convert_to_image(sudokus[0], size=16, flipped=False) convert_to_image(sudokus[1], size=10, flipped=True) - self.p.set(align="right") - self.p.image("sudoku_10.png") self.p.set(align="center") self.p.image("sudoku_16.png") + self.p.set(align="right") + self.p.image("sudoku_10.png") + self.p.set(align="left") # self.p.close() # self.p = Usb(idVendor=0x0416, idProduct=0x5011, usb_args=None, timeout=4 , in_ep=0x81, out_ep=0x02, profile="POS-5890") @@ -159,7 +160,7 @@ class ThermalPrinter(): def print_wordsearch(self): # words = ("gugu,gaga") r = RandomWord() - words = r.random_words(5, include_parts_of_speech=["nouns", "verbs", "adjectives"], word_max_length=16) + words = r.random_words(7, include_parts_of_speech=["nouns", "verbs", "adjectives"], word_max_length=16) w = WordSearch(','.join(words), 16, 16) self.p.set(align="left")