From 63555cfa85352f094fb736200489f1a4ff460b33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Tue, 28 Feb 2023 19:10:43 +0100 Subject: [PATCH] adjust json output to arbitrary move count --- sat.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sat.py b/sat.py index be2ad88..cd016d5 100644 --- a/sat.py +++ b/sat.py @@ -56,6 +56,8 @@ def toJSON(model): hands = [deck[4*p:4*(p+1)] for p in range(0,5)] actions = [] for m in range(MOVES): + if model.get_py_value(dummyturn[m]): + break if model.get_py_value(discard_any[m]): discarded = next(i for i in range(0,50) if model.get_py_value(discard[m][i])) icard = hands[m % 5].index(deck[discarded]) @@ -90,7 +92,6 @@ def toJSON(model): "first_player": 0, "options": { "variant": "No Variant", - "allOrNothing": True } } print(json.dumps(game))