35 lines
866 B
Python
35 lines
866 B
Python
class Dst:
|
|
def __init__(self):
|
|
self.messages = []
|
|
self.checklist = {
|
|
"ilosc": None,
|
|
"tytul": None,
|
|
"dzien": None,
|
|
"godzina": None,
|
|
"miejsce": None,
|
|
"numer": None,
|
|
|
|
}
|
|
self.history = []
|
|
|
|
def store(self, message):
|
|
self.messages.append(message)
|
|
|
|
def get_messages(self):
|
|
return self.messages
|
|
|
|
def get_next_question(self):
|
|
for key, value in self.checklist.items():
|
|
if value == None:
|
|
return key
|
|
|
|
def reset(self):
|
|
for key, value in self.checklist.items():
|
|
value = None;
|
|
|
|
def save_answer(self, slots):
|
|
for slot in slots:
|
|
#print(slot[0],slot[1])
|
|
self.checklist[slot[0]] = slot[1]
|
|
|
|
self.messages.append(slots) |