graph-games-proto 0.3.1766__py3-none-any.whl → 0.3.1767__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
 
@@ -6640,6 +6643,7 @@ DEFAULT_LEGAL_ACTIONS_HOOK = """def handler(game, player_idx):
6640
6643
  game = append_to_legal_actions(
6641
6644
  game,
6642
6645
  LegalAction(
6646
+ auto_preferred=True,
6643
6647
  player_idx=player_idx,
6644
6648
  name="DRAW",
6645
6649
  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.1767
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=A6l7DrNoU4slkgBgagmyo96wLRUuOek_V0daIDa-XyE,240285
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.1767.dist-info/METADATA,sha256=sUMhdJ46n4kloyjiTrXJpIOE4268b471P3-q7tE35Lw,188
7
+ graph_games_proto-0.3.1767.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
8
+ graph_games_proto-0.3.1767.dist-info/top_level.txt,sha256=-4QSrBMf_MM4BGsr2QXBpqDx8c8k_OPnzGyFjqjakes,18
9
+ graph_games_proto-0.3.1767.dist-info/RECORD,,