U5
This commit is contained in:
parent
88458d0739
commit
494c226d92
@ -18,7 +18,7 @@ DEFAULT_STUDENTS = (
|
|||||||
)
|
)
|
||||||
|
|
||||||
PLANT_NAMES = {
|
PLANT_NAMES = {
|
||||||
"G": "Trava",
|
"G": "Tráva",
|
||||||
"C": "Ďatelina",
|
"C": "Ďatelina",
|
||||||
"R": "Reďkovky",
|
"R": "Reďkovky",
|
||||||
"V": "Fialky",
|
"V": "Fialky",
|
||||||
@ -27,7 +27,7 @@ PLANT_NAMES = {
|
|||||||
|
|
||||||
class Garden:
|
class Garden:
|
||||||
def __init__(self, diagram, students=None):
|
def __init__(self, diagram, students=None):
|
||||||
self.row = diagram.splitlines()
|
self.rows = diagram.splitlines()
|
||||||
self.students = sorted(DEFAULT_STUDENTS if students is None else students)
|
self.students = sorted(DEFAULT_STUDENTS if students is None else students)
|
||||||
|
|
||||||
def plants(self, student):
|
def plants(self, student):
|
||||||
@ -42,4 +42,3 @@ class Garden:
|
|||||||
return [
|
return [
|
||||||
PLANT_NAMES[code] for row in self.rows for code in row[start : start + 2]
|
PLANT_NAMES[code] for row in self.rows for code in row[start : start + 2]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user