From e19f1042cba696ab7e6b4f69ca48c4fbd04e1230 Mon Sep 17 00:00:00 2001 From: Eric House Date: Wed, 7 Jul 2021 18:39:53 -0700 Subject: [PATCH] add option to force number of tiles in tray --- xwords4/linux/scripts/discon_ok2.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xwords4/linux/scripts/discon_ok2.py b/xwords4/linux/scripts/discon_ok2.py index f46aedd44..d88c1875c 100755 --- a/xwords4/linux/scripts/discon_ok2.py +++ b/xwords4/linux/scripts/discon_ok2.py @@ -510,7 +510,9 @@ def build_cmds(args): if DEV == 1 or usePublic: PARAMS += ['--force-game'] if DEV == 1: PARAMS += ['--server', '--phonies', phonies ] - PARAMS += ['--tray-size', random.randint(7, 9)] # randint() is *inclusive* + if 0 == args.TRAYSIZE: traySize = random.randint(7, 9) + else: traySize = args.TRAYSIZE + PARAMS += ['--tray-size', traySize] # randint() is *inclusive* # IFF there are any non-1 player counts, tell inviter which if sum(LOCALS) > NDEVS: PARAMS += ['--invitee-counts', ":".join(str(n) for n in LOCALS[1:])] @@ -793,6 +795,8 @@ def mkParser(): parser.add_argument('--mqtt-host', dest = 'MQTT_HOST', default = 'localhost' ) parser.add_argument('--remove-relay', dest = 'ADD_RELAY', default = True, action = 'store_false') + parser.add_argument('--force-tray', dest = 'TRAYSIZE', default = 0, type = int, + help = 'Always this many tiles per tray') parser.add_argument('--core-pat', dest = 'CORE_PAT', default = os.environ.get('DISCON_COREPAT'), help = "pattern for core files that should stop the script " \