Move lexicon status strings to class constants
This commit is contained in:
parent
dcf039c9de
commit
7a17b48a4d
|
@ -8,6 +8,10 @@ from amanuensis.config import (
|
||||||
|
|
||||||
|
|
||||||
class LexiconModel():
|
class LexiconModel():
|
||||||
|
PREGAME = "unstarted"
|
||||||
|
ONGOING = "ongoing"
|
||||||
|
COMPLETE = "completed"
|
||||||
|
|
||||||
"""Represents a lexicon in the Amanuensis config store"""
|
"""Represents a lexicon in the Amanuensis config store"""
|
||||||
def __init__(self, root: RootConfigDirectoryContext, lid: str):
|
def __init__(self, root: RootConfigDirectoryContext, lid: str):
|
||||||
self._lid: str = lid
|
self._lid: str = lid
|
||||||
|
@ -54,7 +58,7 @@ class LexiconModel():
|
||||||
@property
|
@property
|
||||||
def status(self) -> str:
|
def status(self) -> str:
|
||||||
if self.cfg.turn.current is None:
|
if self.cfg.turn.current is None:
|
||||||
return "unstarted"
|
return LexiconModel.PREGAME
|
||||||
if self.cfg.turn.current > self.cfg.turn.max:
|
if self.cfg.turn.current > self.cfg.turn.max:
|
||||||
return "completed"
|
return LexiconModel.COMPLETE
|
||||||
return "ongoing"
|
return LexiconModel.ONGOING
|
||||||
|
|
Loading…
Reference in New Issue