graph-games-proto 0.3.2292__py3-none-any.whl → 0.3.2303__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- graph_games_proto/fns.py +8 -8
- {graph_games_proto-0.3.2292.dist-info → graph_games_proto-0.3.2303.dist-info}/METADATA +1 -1
- {graph_games_proto-0.3.2292.dist-info → graph_games_proto-0.3.2303.dist-info}/RECORD +5 -5
- {graph_games_proto-0.3.2292.dist-info → graph_games_proto-0.3.2303.dist-info}/WHEEL +0 -0
- {graph_games_proto-0.3.2292.dist-info → graph_games_proto-0.3.2303.dist-info}/top_level.txt +0 -0
graph_games_proto/fns.py
CHANGED
@@ -1036,13 +1036,13 @@ class Player(PClass):
|
|
1036
1036
|
idx = field(type=int)
|
1037
1037
|
pieces = field(type=list) # List[Piece]
|
1038
1038
|
cards = field(type=list) # List[Card]
|
1039
|
-
discard_tray = field(type=PVector) # PVector[
|
1039
|
+
discard_tray = field(type=PVector) # PVector[str]
|
1040
1040
|
def __todict__(self):
|
1041
1041
|
return {
|
1042
1042
|
"idx": self.idx,
|
1043
1043
|
"pieces": self.pieces,
|
1044
1044
|
"cards": self.cards,
|
1045
|
-
"discard_tray":
|
1045
|
+
"discard_tray": list(self.discard_tray),
|
1046
1046
|
}
|
1047
1047
|
@staticmethod
|
1048
1048
|
def __fromdict__(d):
|
@@ -1050,7 +1050,7 @@ class Player(PClass):
|
|
1050
1050
|
idx=d["idx"],
|
1051
1051
|
pieces=d["pieces"],
|
1052
1052
|
cards=d["cards"],
|
1053
|
-
discard_tray=
|
1053
|
+
discard_tray=v(d["discard_tray"])
|
1054
1054
|
)
|
1055
1055
|
|
1056
1056
|
|
@@ -3838,7 +3838,7 @@ def handle_keep_action(kernel, action):
|
|
3838
3838
|
# Clear the discard tray and add the kept cards back
|
3839
3839
|
player.cards.extend([c for c in kept_cards if c is not None])
|
3840
3840
|
|
3841
|
-
player.set(discard_tray=v())
|
3841
|
+
kernel.players[player.idx] = player.set(discard_tray=v())
|
3842
3842
|
return kernel.set(decks=kernel.decks, players=kernel.players)
|
3843
3843
|
|
3844
3844
|
|
@@ -4583,10 +4583,10 @@ def getnextstate2(s, a, log=False):
|
|
4583
4583
|
is_legal, reason = isactionlegal2(s, a)
|
4584
4584
|
if not is_legal:
|
4585
4585
|
print("****************************** Action is not legal: ", json.dumps(a.__todict__(), indent=2))
|
4586
|
-
|
4587
|
-
|
4588
|
-
|
4589
|
-
|
4586
|
+
print("a")
|
4587
|
+
print("json.dumps(s.legal_actions_3): ", json.dumps([la.__todict__() for la in s.legal_actions_3], indent=2))
|
4588
|
+
print("b")
|
4589
|
+
print("\n\n")
|
4590
4590
|
raise ValueError(f"Action is not legal: {a}. Reason: {reason}")
|
4591
4591
|
kernel = s.kernel
|
4592
4592
|
kernel = run_state_action_hooks(kernel, a, AFTER_ACCEPT_ACTION_HOOKS, log)
|
@@ -1,9 +1,9 @@
|
|
1
1
|
graph_games_proto/__init__.py,sha256=3XawPcYk9Zk-Hj4M8eNBdGzBccKG8dWj8ZZGRkWnmA4,735
|
2
2
|
graph_games_proto/all_types.py,sha256=IpbwftEcHS5Ewz-saFNk0lO9FvcbuHG36odRTayCXUk,54911
|
3
|
-
graph_games_proto/fns.py,sha256=
|
3
|
+
graph_games_proto/fns.py,sha256=O7HmUzVpxRylWPAVVWWd_RbRUBH7b7OqpYZwgcx8zLQ,211321
|
4
4
|
graph_games_proto/main.py,sha256=fj2U7KcwrpZtuUhjOX5yVxY18LZvvsxDFYZ_S5mxe04,145
|
5
5
|
graph_games_proto/state.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
|
-
graph_games_proto-0.3.
|
7
|
-
graph_games_proto-0.3.
|
8
|
-
graph_games_proto-0.3.
|
9
|
-
graph_games_proto-0.3.
|
6
|
+
graph_games_proto-0.3.2303.dist-info/METADATA,sha256=oDRrs4VYohUfGEKljdRGypNM-QCMJk_vu3YcpgYYVIE,188
|
7
|
+
graph_games_proto-0.3.2303.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
8
|
+
graph_games_proto-0.3.2303.dist-info/top_level.txt,sha256=-4QSrBMf_MM4BGsr2QXBpqDx8c8k_OPnzGyFjqjakes,18
|
9
|
+
graph_games_proto-0.3.2303.dist-info/RECORD,,
|
File without changes
|
File without changes
|