graph-games-proto 0.3.2095__py3-none-any.whl → 0.3.2096__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
@@ -2551,6 +2551,7 @@ class PublicState(PClass):
2551
2551
  terminal = field(type=bool)
2552
2552
  def __todict__(self):
2553
2553
  return {
2554
+ "game_config": self.game_config.__todict__(),
2554
2555
  "deadlines": [deadline.__todict__() if deadline else None for deadline in self.deadlines],
2555
2556
  "game_started_at": self.game_started_at,
2556
2557
  "allotted_times": [allotted_time.__todict__() if allotted_time else None for allotted_time in self.allotted_times], # List[AllottedTime|None]
@@ -2577,6 +2578,7 @@ class PublicState(PClass):
2577
2578
  @staticmethod
2578
2579
  def __fromdict__(d):
2579
2580
  return PublicState(
2581
+ game_config=PublicGameConfig.__fromdict__(d["game_config"]),
2580
2582
  deadlines=[RemainingAllottedTime.__fromdict__(x) for x in d["deadlines"]],
2581
2583
  game_started_at=d["game_started_at"],
2582
2584
  allotted_times=[AllottedTime.__fromdict__(x) if x else None for x in d["allotted_times"]], # List[AllottedTime|None]
@@ -4557,7 +4559,7 @@ def get_deadline(s, max_allotted_time):
4557
4559
  since_action_idx = max_allotted_time.since_action_idx
4558
4560
  if since_action_idx == -1:
4559
4561
  allotted_since = datetime.strptime(
4560
- s.kernel.started_at,
4562
+ s.kernel.game_config.started_at,
4561
4563
  "%Y-%m-%d %H:%M:%S"
4562
4564
  )
4563
4565
  else:
@@ -4713,7 +4715,7 @@ def getpublicstate(s):
4713
4715
  return PublicState(
4714
4716
  game_config=getpublicgameconfig(s.kernel.game_config),
4715
4717
  deadlines=get_deadlines(s),
4716
- game_started_at=s.kernel.started_at,
4718
+ game_started_at=s.kernel.game_config.started_at,
4717
4719
  allotted_times=get_max_allotted_times(s),
4718
4720
  all_pieces=list(s.kernel.pieceuuid2piece.values()),
4719
4721
  to_play_2=getpublictoplay(s),
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: graph_games_proto
3
- Version: 0.3.2095
3
+ Version: 0.3.2096
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=_EVQR-51XehfH45XZlba1WPdx3omS3Gm1nTwrgGyn2Q,667
2
2
  graph_games_proto/all_types.py,sha256=IpbwftEcHS5Ewz-saFNk0lO9FvcbuHG36odRTayCXUk,54911
3
- graph_games_proto/fns.py,sha256=aq2Vxkuz1J4LGAPlO8OZtW1Tns81gL68UICMfsZzeHY,199556
3
+ graph_games_proto/fns.py,sha256=Ni2ywvhv9562Hi1_pQie5P4aEtqLORss3yxaF-b24L8,199711
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.2095.dist-info/METADATA,sha256=3B4hZJi4LhHbTKGGFf-y7t0nTc0sQ-w_1rPTCZ0-jyA,188
7
- graph_games_proto-0.3.2095.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
8
- graph_games_proto-0.3.2095.dist-info/top_level.txt,sha256=-4QSrBMf_MM4BGsr2QXBpqDx8c8k_OPnzGyFjqjakes,18
9
- graph_games_proto-0.3.2095.dist-info/RECORD,,
6
+ graph_games_proto-0.3.2096.dist-info/METADATA,sha256=RsItWXIDMFkMIN2peGo0mTJo6zq6UpjN64X5kChH3qE,188
7
+ graph_games_proto-0.3.2096.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
8
+ graph_games_proto-0.3.2096.dist-info/top_level.txt,sha256=-4QSrBMf_MM4BGsr2QXBpqDx8c8k_OPnzGyFjqjakes,18
9
+ graph_games_proto-0.3.2096.dist-info/RECORD,,