1-reproducible-board #2

Merged
panki merged 7 commits from 1-reproducible-board into master 2024-05-09 18:44:46 +02:00
Showing only changes of commit b8e0943b07 - Show all commits

View File

@ -8,10 +8,13 @@ from textual.color import Color
from asyncio import sleep from asyncio import sleep
from datetime import datetime
import random
class BingoField(Static): class BingoField(Static):
"""A Bingo field widget.""" """A Bingo field widget."""
cursor_x, cursor_y = 2 cursor_x, cursor_y = 2, 2
class Selected(Message): class Selected(Message):
"""Send message to the board containing clicked field info""" """Send message to the board containing clicked field info"""
@ -83,8 +86,9 @@ class BingoApp(App):
'Gulasch gegessen' 'Gulasch gegessen'
] ]
# todo: prng stuff # get rng seed from current time
import random seed = int(datetime.now().timestamp())
random.seed(seed)
random.shuffle(fields) random.shuffle(fields)
def compose(self) -> ComposeResult: def compose(self) -> ComposeResult: