ui: add cheats

This commit is contained in:
rr-
2018-11-05 21:04:40 +01:00
parent ccb02b1d61
commit 3282610c09
3 changed files with 51 additions and 5 deletions
+9 -1
View File
@@ -1,3 +1,4 @@
import argparse
from pathlib import Path
import xdg
@@ -8,11 +9,18 @@ from pqcli.ui import Ui
SAVE_PATH = Path(xdg.XDG_CONFIG_HOME) / "pqcli" / "save.dat"
def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser(prog="pqcli")
parser.add_argument("--cheats", help="enable cheats", action="store_true")
return parser.parse_args()
def main() -> None:
args = parse_args()
roster = Roster.load(SAVE_PATH)
try:
Ui(roster).run()
Ui(roster, args).run()
finally:
roster.save(SAVE_PATH)