graph-games-proto 0.3.1766__py3-none-any.whl → 0.3.1768__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
@@ -1678,6 +1678,7 @@ class LegalAction(PClass):
1678
1678
  draw_discard = field(type=(LegalActionDrawDiscard, type(None)), initial=None) # LegalActionDrawDiscard
1679
1679
  faceup_draw = field(type=(LegalActionFaceupDraw, type(None)), initial=None) # LegalActionFaceupDraw
1680
1680
  move_pieces_to_path = field(type=(LegalActionMovePiecesToPath, type(None)), initial=None) # LegalActionMovePiecesToPath
1681
+ auto_preferred = field(type=bool, initial=False) # bool
1681
1682
  def get_default_action(self, state):
1682
1683
  submitted_at = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
1683
1684
  if self.discard:
@@ -1719,6 +1720,7 @@ class LegalAction(PClass):
1719
1720
  "draw_discard": self.draw_discard.__todict__() if self.draw_discard else None,
1720
1721
  "faceup_draw": self.faceup_draw.__todict__() if self.faceup_draw else None,
1721
1722
  "move_pieces_to_path": self.move_pieces_to_path.__todict__() if self.move_pieces_to_path else None,
1723
+ "auto_preferred": self.auto_preferred,
1722
1724
  }
1723
1725
  @staticmethod
1724
1726
  def __fromdict__(d):
@@ -1736,6 +1738,7 @@ class LegalAction(PClass):
1736
1738
  draw_discard=LegalActionDrawDiscard.__fromdict__(d["draw_discard"]) if d.get("draw_discard") else None,
1737
1739
  faceup_draw=LegalActionFaceupDraw.__fromdict__(d["faceup_draw"]) if d.get("faceup_draw") else None,
1738
1740
  move_pieces_to_path=LegalActionMovePiecesToPath.__fromdict__(d["move_pieces_to_path"]) if d.get("move_pieces_to_path") else None,
1741
+ auto_preferred=d.get("auto_preferred", False), # Handle None case
1739
1742
  )
1740
1743
 
1741
1744
 
@@ -3309,6 +3312,7 @@ def append_follow_up_draw_legal_actions(game, action):
3309
3312
  game = append_to_legal_actions(
3310
3313
  game,
3311
3314
  LegalAction(
3315
+ auto_preferred=True,
3312
3316
  player_idx=legal_action.player_idx,
3313
3317
  name="DRAW",
3314
3318
  instruction="draw a unit",
@@ -6640,6 +6644,7 @@ DEFAULT_LEGAL_ACTIONS_HOOK = """def handler(game, player_idx):
6640
6644
  game = append_to_legal_actions(
6641
6645
  game,
6642
6646
  LegalAction(
6647
+ auto_preferred=True,
6643
6648
  player_idx=player_idx,
6644
6649
  name="DRAW",
6645
6650
  instruction="draw a unit",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: graph_games_proto
3
- Version: 0.3.1766
3
+ Version: 0.3.1768
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=5GV9Sao6aPxDb78XlawU2xd1JZ6Xk2LzjkkboAvMPig,240061
3
+ graph_games_proto/fns.py,sha256=QpIII79TW69HB7YRGnzgYuiXRQUX4lUc3MxzSd6dOJk,240326
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.1766.dist-info/METADATA,sha256=Tjlx9BrhSy0bXXNDsp9sXVjk64YfA56ZurIHY4rn0oc,188
7
- graph_games_proto-0.3.1766.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
8
- graph_games_proto-0.3.1766.dist-info/top_level.txt,sha256=-4QSrBMf_MM4BGsr2QXBpqDx8c8k_OPnzGyFjqjakes,18
9
- graph_games_proto-0.3.1766.dist-info/RECORD,,
6
+ graph_games_proto-0.3.1768.dist-info/METADATA,sha256=5Sot-Oku-XTZknUaq_DQG-rm1XYcBYPfpp-h9oITSJM,188
7
+ graph_games_proto-0.3.1768.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
8
+ graph_games_proto-0.3.1768.dist-info/top_level.txt,sha256=-4QSrBMf_MM4BGsr2QXBpqDx8c8k_OPnzGyFjqjakes,18
9
+ graph_games_proto-0.3.1768.dist-info/RECORD,,