graph-games-proto 0.3.2118__py3-none-any.whl → 0.3.2125__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
@@ -2881,23 +2881,27 @@ def run_state_action_hooks(state, action, hooks, log=False):
2881
2881
 
2882
2882
  @dispatch(State, int)
2883
2883
  def score_public_items3(state, player_idx):
2884
+ k = state.kernel
2884
2885
  items = []
2885
- for edge in state.kernel.edges:
2886
- for path in edge.paths:
2887
- if len(path.segments) > 0:
2888
- first_segment = path.segments[0]
2889
- if first_segment.pieces and len(first_segment.pieces) > 0:
2890
- first_piece = state.kernel.pieceuuid2piece[first_segment.pieces[0]]
2886
+ for edge_record in k.uuid2edgerecord.values():
2887
+ for path_idx in edge_record.path_idxs:
2888
+ path_record = k.idx2pathrecord[path_idx]
2889
+ if len(path_record.segment_uuids) > 0:
2890
+ first_segment_uuid = path_record.segment_uuids[0]
2891
+ first_segment_record = k.uuid2segmentrecord[first_segment_uuid]
2892
+ if len(first_segment_record.piece_uuids) > 0:
2893
+ piece_uuid = first_segment_record.piece_uuids[0]
2894
+ first_piece = k.pieceuuid2piece[piece_uuid]
2891
2895
  if first_piece.player_idx == player_idx:
2892
2896
  items.append(
2893
2897
  ScoreItem2(
2894
- amount=edge.score,
2898
+ amount=edge_record.score,
2895
2899
  owns_path=ScoreItemOwnsPath(
2896
- path_idx=path.idx,
2897
- edge_uuid=edge.uuid,
2898
- length=len(path.segments),
2900
+ path_idx=path_record.idx,
2901
+ edge_uuid=edge_record.uuid,
2902
+ length=len(path_record.segment_uuids),
2899
2903
  ),
2900
- description="Player {} owns edge {}".format(player_idx, edge.uuid),
2904
+ description="Player {} owns edge {}".format(player_idx, edge_record.uuid),
2901
2905
  )
2902
2906
  )
2903
2907
  for bonus_status in state.bonus_statuses_3:
@@ -4764,7 +4768,7 @@ def imagine_state(ps):
4764
4768
  public = ps.public
4765
4769
  game_config = public.game_config
4766
4770
 
4767
- candidate_decks = get_candadate_decks(ps)
4771
+ candidate_decks = get_candidate_decks(ps)
4768
4772
  imagined_decks = imagine_decks(ps, candidate_decks)
4769
4773
  imagined_players = imagine_players(ps, candidate_decks)
4770
4774
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: graph_games_proto
3
- Version: 0.3.2118
3
+ Version: 0.3.2125
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=rsQK4PXU4kUg4fdBwLS4jDC-evCdHJryN2XqEi9vc14,205364
3
+ graph_games_proto/fns.py,sha256=4AJuya9rToZ6X9R1s3VaIgPVfgSzWgFGtcpq1fcb08E,205649
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.2118.dist-info/METADATA,sha256=KF5D3COejVQrapKwsDUdPZL6XHrxhNl0d1qluX__Omk,188
7
- graph_games_proto-0.3.2118.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
8
- graph_games_proto-0.3.2118.dist-info/top_level.txt,sha256=-4QSrBMf_MM4BGsr2QXBpqDx8c8k_OPnzGyFjqjakes,18
9
- graph_games_proto-0.3.2118.dist-info/RECORD,,
6
+ graph_games_proto-0.3.2125.dist-info/METADATA,sha256=QXSXIlQrExUjx_OAlmIh0lqTA_OvtbGwxj9OLyIw288,188
7
+ graph_games_proto-0.3.2125.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
8
+ graph_games_proto-0.3.2125.dist-info/top_level.txt,sha256=-4QSrBMf_MM4BGsr2QXBpqDx8c8k_OPnzGyFjqjakes,18
9
+ graph_games_proto-0.3.2125.dist-info/RECORD,,