graph-games-proto 0.3.2048__py3-none-any.whl → 0.3.2049__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
@@ -3829,14 +3829,15 @@ def default_accept_action(game, action):
3829
3829
  return True, "Action is legal"
3830
3830
 
3831
3831
 
3832
- def is_move_pieces_to_path_action_legal(game, action):
3832
+ @dispatch(State, Action2)
3833
+ def is_move_pieces_to_path_action_legal(state, action):
3833
3834
  # print("******************************1234 is_move_pieces_to_path_action_legal 1")
3834
3835
  player_idx = action.legal_action.player_idx
3835
3836
  proposed_cards_uuids = action.move_pieces_to_path.card_uuids
3836
3837
  path_idx = action.legal_action.move_pieces_to_path.path_idx
3837
- path = game.idx2path[path_idx]
3838
- proposed_cards = [card_uuid for card_uuid in game.players[player_idx].cards if card_uuid in proposed_cards_uuids]
3839
- proposed_pieces = [piece_uuid for piece_uuid in game.players[player_idx].pieces if piece_uuid in action.move_pieces_to_path.piece_uuids]
3838
+ path = state.kernel.idx2path[path_idx]
3839
+ proposed_cards = [card_uuid for card_uuid in state.kernel.players[player_idx].cards if card_uuid in proposed_cards_uuids]
3840
+ proposed_pieces = [piece_uuid for piece_uuid in state.kernel.players[player_idx].pieces if piece_uuid in action.move_pieces_to_path.piece_uuids]
3840
3841
  remaining_segments = path.segments
3841
3842
 
3842
3843
  # print("******************************1234 is_move_pieces_to_path_action_legal 1b: ", proposed_cards)
@@ -3844,7 +3845,7 @@ def is_move_pieces_to_path_action_legal(game, action):
3844
3845
  # print("******************************1234 is_move_pieces_to_path_action_legal 1d: ", len(remaining_segments))
3845
3846
 
3846
3847
  card_fulfillment, piece_fulfillment = get_path_fulfillment_from_resources(
3847
- game.kernel,
3848
+ state.kernel,
3848
3849
  proposed_cards,
3849
3850
  proposed_pieces,
3850
3851
  remaining_segments,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: graph_games_proto
3
- Version: 0.3.2048
3
+ Version: 0.3.2049
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=EwTQeH3_ETgtokeIWWwhknhm2xwwNXsrOnZmHJCsrbY,193876
3
+ graph_games_proto/fns.py,sha256=XmmV1LeHVFb124gHfvHwivUnO8B231kEfpFYPZ746zY,193928
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.2048.dist-info/METADATA,sha256=jFBQBA1PEMqkF0XZWSaxfC8QitY__t_zqqt0QsI-_H4,188
7
- graph_games_proto-0.3.2048.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
8
- graph_games_proto-0.3.2048.dist-info/top_level.txt,sha256=-4QSrBMf_MM4BGsr2QXBpqDx8c8k_OPnzGyFjqjakes,18
9
- graph_games_proto-0.3.2048.dist-info/RECORD,,
6
+ graph_games_proto-0.3.2049.dist-info/METADATA,sha256=Hs1pmJOZluWebeiniLQ1oUCQFlU4M43oPIO-oeHiukM,188
7
+ graph_games_proto-0.3.2049.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
8
+ graph_games_proto-0.3.2049.dist-info/top_level.txt,sha256=-4QSrBMf_MM4BGsr2QXBpqDx8c8k_OPnzGyFjqjakes,18
9
+ graph_games_proto-0.3.2049.dist-info/RECORD,,