graph-games-proto 0.3.2046__py3-none-any.whl → 0.3.2048__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 +9 -9
- {graph_games_proto-0.3.2046.dist-info → graph_games_proto-0.3.2048.dist-info}/METADATA +1 -1
- {graph_games_proto-0.3.2046.dist-info → graph_games_proto-0.3.2048.dist-info}/RECORD +5 -5
- {graph_games_proto-0.3.2046.dist-info → graph_games_proto-0.3.2048.dist-info}/WHEEL +0 -0
- {graph_games_proto-0.3.2046.dist-info → graph_games_proto-0.3.2048.dist-info}/top_level.txt +0 -0
graph_games_proto/fns.py
CHANGED
@@ -3167,15 +3167,15 @@ def handle_draw_discard_action(kernel, action):
|
|
3167
3167
|
)
|
3168
3168
|
|
3169
3169
|
|
3170
|
-
@dispatch(
|
3171
|
-
def get_follow_up_draw_legal_actions(
|
3170
|
+
@dispatch(StateKernel, Action2)
|
3171
|
+
def get_follow_up_draw_legal_actions(kernel, action):
|
3172
3172
|
to_return = []
|
3173
3173
|
legal_action = action.legal_action
|
3174
|
-
if len(
|
3175
|
-
last_action =
|
3174
|
+
if len(kernel.history) >= 2:
|
3175
|
+
last_action = kernel.history[-2]
|
3176
3176
|
if (last_action.legal_action.player_idx != legal_action.player_idx) or last_action.legal_action.name == "INITIAL-GOAL-KEEP":
|
3177
3177
|
|
3178
|
-
if len(
|
3178
|
+
if len(kernel.decks[0].facedown_stack) >= 1:
|
3179
3179
|
to_return.append(
|
3180
3180
|
LegalAction(
|
3181
3181
|
auto_preferred=True,
|
@@ -3183,7 +3183,7 @@ def get_follow_up_draw_legal_actions(state, action):
|
|
3183
3183
|
name="DRAW",
|
3184
3184
|
instruction="draw a unit",
|
3185
3185
|
allotted_seconds=DEFAULT_ALLOTTED_SECONDS,
|
3186
|
-
allotted_since_action_idx=(len(
|
3186
|
+
allotted_since_action_idx=(len(kernel.history) - 1),
|
3187
3187
|
draw=LegalActionDraw(
|
3188
3188
|
deck_idx=0,
|
3189
3189
|
quantity=1,
|
@@ -3191,16 +3191,16 @@ def get_follow_up_draw_legal_actions(state, action):
|
|
3191
3191
|
)
|
3192
3192
|
)
|
3193
3193
|
|
3194
|
-
for card_uuid in
|
3194
|
+
for card_uuid in kernel.decks[0].faceup_spots:
|
3195
3195
|
if card_uuid:
|
3196
|
-
if not
|
3196
|
+
if not kernel.carduuid2card[card_uuid].is_wild:
|
3197
3197
|
to_return.append(
|
3198
3198
|
LegalAction(
|
3199
3199
|
player_idx=legal_action.player_idx,
|
3200
3200
|
name="FACEUP-DRAW",
|
3201
3201
|
instruction="draw a faceup unit",
|
3202
3202
|
allotted_seconds=DEFAULT_ALLOTTED_SECONDS,
|
3203
|
-
allotted_since_action_idx=(len(
|
3203
|
+
allotted_since_action_idx=(len(kernel.history) - 1),
|
3204
3204
|
faceup_draw=LegalActionFaceupDraw(
|
3205
3205
|
deck_idx=0,
|
3206
3206
|
card_uuid=card_uuid,
|
@@ -1,9 +1,9 @@
|
|
1
1
|
graph_games_proto/__init__.py,sha256=_EVQR-51XehfH45XZlba1WPdx3omS3Gm1nTwrgGyn2Q,667
|
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=EwTQeH3_ETgtokeIWWwhknhm2xwwNXsrOnZmHJCsrbY,193876
|
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.2048.dist-info/METADATA,sha256=jFBQBA1PEMqkF0XZWSaxfC8QitY__t_zqqt0QsI-_H4,188
|
7
|
+
graph_games_proto-0.3.2048.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
8
|
+
graph_games_proto-0.3.2048.dist-info/top_level.txt,sha256=-4QSrBMf_MM4BGsr2QXBpqDx8c8k_OPnzGyFjqjakes,18
|
9
|
+
graph_games_proto-0.3.2048.dist-info/RECORD,,
|
File without changes
|
File without changes
|