add 2 words to word search, move sudoku solution under sudoku

This commit is contained in:
samerbam 2023-08-23 20:11:05 -04:00
parent c0c4328e07
commit a7717b04d6

View File

@ -133,10 +133,11 @@ class ThermalPrinter():
sudokus = generate_sudoku() sudokus = generate_sudoku()
convert_to_image(sudokus[0], size=16, flipped=False) convert_to_image(sudokus[0], size=16, flipped=False)
convert_to_image(sudokus[1], size=10, flipped=True) 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.set(align="center")
self.p.image("sudoku_16.png") 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.close()
# self.p = Usb(idVendor=0x0416, idProduct=0x5011, usb_args=None, timeout=4 , in_ep=0x81, out_ep=0x02, profile="POS-5890") # 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): def print_wordsearch(self):
# words = ("gugu,gaga") # words = ("gugu,gaga")
r = RandomWord() 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) w = WordSearch(','.join(words), 16, 16)
self.p.set(align="left") self.p.set(align="left")