22 lines
		
	
	
	
		
			527 B
		
	
	
	
		
			Python
		
	
	
		
			Executable file
		
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
	
		
			527 B
		
	
	
	
		
			Python
		
	
	
		
			Executable file
		
	
	
	
	
| #!/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
 | |
| 
 | |
| g = db.Game(game_mode="", configuration={}, teams_count=1)
 | |
| 
 | |
| 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:
 | |
|     lib.game_restore_broken(args.game_id)
 | |
| if args.step:
 | |
|     lib.game_step(args.game_id)
 |