graph-games-proto 0.3.1781__py3-none-any.whl → 0.3.1784__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 CHANGED
@@ -3309,37 +3309,42 @@ def append_follow_up_draw_legal_actions(game, action):
3309
3309
  if len(game.history) >= 2:
3310
3310
  last_action = game.history[-2]
3311
3311
  if (last_action.legal_action.player_idx != legal_action.player_idx) or last_action.legal_action.name == "INITIAL-GOAL-KEEP":
3312
- game = append_to_legal_actions(
3313
- game,
3314
- LegalAction(
3315
- auto_preferred=True,
3316
- player_idx=legal_action.player_idx,
3317
- name="DRAW",
3318
- instruction="draw a unit",
3319
- allotted_seconds=DEFAULT_ALLOTTED_SECONDS,
3320
- allotted_since_action_idx=(len(game.history) - 1),
3321
- draw=LegalActionDraw(
3322
- deck_idx=0,
3323
- quantity=1,
3312
+
3313
+ if len(game.decks[0].facedown_stack) >= 1:
3314
+ game = append_to_legal_actions(
3315
+ game,
3316
+ LegalAction(
3317
+ auto_preferred=True,
3318
+ player_idx=legal_action.player_idx,
3319
+ name="DRAW",
3320
+ instruction="draw a unit",
3321
+ allotted_seconds=DEFAULT_ALLOTTED_SECONDS,
3322
+ allotted_since_action_idx=(len(game.history) - 1),
3323
+ draw=LegalActionDraw(
3324
+ deck_idx=0,
3325
+ quantity=1,
3326
+ )
3324
3327
  )
3325
3328
  )
3326
- )
3329
+
3327
3330
  for card_uuid in game.decks[0].faceup_spots:
3328
- if not game.carduuid2card[card_uuid].is_wild:
3329
- game = append_to_legal_actions(
3330
- game,
3331
- LegalAction(
3332
- player_idx=legal_action.player_idx,
3333
- name="FACEUP-DRAW",
3334
- instruction="draw a faceup unit",
3335
- allotted_seconds=DEFAULT_ALLOTTED_SECONDS,
3336
- allotted_since_action_idx=(len(game.history) - 1),
3337
- faceup_draw=LegalActionFaceupDraw(
3338
- deck_idx=0,
3339
- card_uuid=card_uuid,
3331
+ if card_uuid:
3332
+ if not game.carduuid2card[card_uuid].is_wild:
3333
+ game = append_to_legal_actions(
3334
+ game,
3335
+ LegalAction(
3336
+ player_idx=legal_action.player_idx,
3337
+ name="FACEUP-DRAW",
3338
+ instruction="draw a faceup unit",
3339
+ allotted_seconds=DEFAULT_ALLOTTED_SECONDS,
3340
+ allotted_since_action_idx=(len(game.history) - 1),
3341
+ faceup_draw=LegalActionFaceupDraw(
3342
+ deck_idx=0,
3343
+ card_uuid=card_uuid,
3344
+ )
3340
3345
  )
3341
3346
  )
3342
- )
3347
+
3343
3348
  return game
3344
3349
 
3345
3350
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: graph_games_proto
3
- Version: 0.3.1781
3
+ Version: 0.3.1784
4
4
  Requires-Dist: multipledispatch==1.0.0
5
5
  Requires-Dist: pyrsistent==0.20.0
6
6
  Requires-Dist: numpy==2.2.4
@@ -1,9 +1,9 @@
1
1
  graph_games_proto/__init__.py,sha256=O5XjRfe3DlxbJn4zezDvvy7cXvL4IzIRPZCL3Y-n7s8,776
2
2
  graph_games_proto/all_types.py,sha256=IpbwftEcHS5Ewz-saFNk0lO9FvcbuHG36odRTayCXUk,54911
3
- graph_games_proto/fns.py,sha256=q80TzVkBDwgTbbaouhJJQtfFqysgoQT1T53xUFc3GN0,240705
3
+ graph_games_proto/fns.py,sha256=Za7-8Qj431HKfbjp7eQkErFwhafx8LcwRsFQ17-tow8,240941
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.1781.dist-info/METADATA,sha256=bKw7-SvRTUBQoSPfBj7uniqcYSfcFO2DJD7Uak6mvHI,188
7
- graph_games_proto-0.3.1781.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
8
- graph_games_proto-0.3.1781.dist-info/top_level.txt,sha256=-4QSrBMf_MM4BGsr2QXBpqDx8c8k_OPnzGyFjqjakes,18
9
- graph_games_proto-0.3.1781.dist-info/RECORD,,
6
+ graph_games_proto-0.3.1784.dist-info/METADATA,sha256=sgqj-1XoRKE-eW7ii1bOmLU79Aky6CxllUlgBEM7JN0,188
7
+ graph_games_proto-0.3.1784.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
8
+ graph_games_proto-0.3.1784.dist-info/top_level.txt,sha256=-4QSrBMf_MM4BGsr2QXBpqDx8c8k_OPnzGyFjqjakes,18
9
+ graph_games_proto-0.3.1784.dist-info/RECORD,,