SKSP_2022_strategicka_hra/server/bin/control_game

21 lines
467 B
Text
Raw Normal View History

2022-09-12 17:47:58 +02:00
#!/usr/bin/env python3
import hra.db as db
import hra.lib as lib
from hra.util import hash_passwd
import argparse
from sqlalchemy import exc, update
import sys
parser = argparse.ArgumentParser()
parser.add_argument("game_id")
parser.add_argument("--step", action="store_true")
parser.add_argument("--restore", action="store_true")
args = parser.parse_args()
if args.restore:
2022-09-12 21:54:42 +02:00
lib.game_restore_broken(args.game_id)
2022-09-12 17:47:58 +02:00
if args.step:
2022-09-12 21:54:42 +02:00
lib.game_step(args.game_id)