graph-games-proto 0.3.1923__py3-none-any.whl → 0.3.1930__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
@@ -3065,7 +3065,7 @@ def get_follow_up_draw_legal_actions(game, action):
3065
3065
 
3066
3066
  for card_uuid in game.decks[0].faceup_spots:
3067
3067
  if card_uuid:
3068
- if not game.kernel.carduuid2card[card_uuid].is_wild:
3068
+ if not game.carduuid2card[card_uuid].is_wild:
3069
3069
  to_return.append(
3070
3070
  LegalAction(
3071
3071
  player_idx=legal_action.player_idx,
@@ -3877,7 +3877,7 @@ HOOK_NAMESPACE = {
3877
3877
 
3878
3878
  def get_wild_unit_uuids(game):
3879
3879
  wild_unit_uuids = []
3880
- for card in game.kernel.carduuid2card.values():
3880
+ for card in game.carduuid2card.values():
3881
3881
  if card.is_wild:
3882
3882
  wild_unit_uuids.append(card.resource_uuid)
3883
3883
  return wild_unit_uuids
@@ -3909,8 +3909,8 @@ def match_non_wild_non_empty(game, fulfillment, cards, segments, log=False):
3909
3909
  new_segments = []
3910
3910
 
3911
3911
  for segment in segments:
3912
- first_strict_matching_idx = next((i for i, card_uuid in enumerate(new_cards) if game.kernel.carduuid2card[card_uuid].resource_uuid == segment.unit_uuid), None)
3913
- first_wild_matching_idx = next((i for i, card_uuid in enumerate(new_cards) if game.kernel.carduuid2card[card_uuid].resource_uuid in wild_unit_uuids), None)
3912
+ first_strict_matching_idx = next((i for i, card_uuid in enumerate(new_cards) if game.carduuid2card[card_uuid].resource_uuid == segment.unit_uuid), None)
3913
+ first_wild_matching_idx = next((i for i, card_uuid in enumerate(new_cards) if game.carduuid2card[card_uuid].resource_uuid in wild_unit_uuids), None)
3914
3914
  first_matching_idx = first_strict_matching_idx if first_strict_matching_idx is not None else first_wild_matching_idx
3915
3915
  if first_matching_idx is not None:
3916
3916
  new_fulfillment.append(new_cards.pop(first_matching_idx))
@@ -3949,14 +3949,14 @@ def match_empty(game, fulfillment, cards, segments):
3949
3949
 
3950
3950
 
3951
3951
  def get_uniform_sets(game, cards, min_length):
3952
- wilds = [card_uuid for card_uuid in cards if game.kernel.carduuid2card[card_uuid].is_wild]
3953
- non_wilds = [card_uuid for card_uuid in cards if not game.kernel.carduuid2card[card_uuid].is_wild]
3952
+ wilds = [card_uuid for card_uuid in cards if game.carduuid2card[card_uuid].is_wild]
3953
+ non_wilds = [card_uuid for card_uuid in cards if not game.carduuid2card[card_uuid].is_wild]
3954
3954
  # print("********************* cards: ", cards)
3955
3955
  # print("********************* wilds: ", wilds)
3956
3956
  # print("********************* non_wilds: ", non_wilds)
3957
3957
  unit_uuid_2_cards = {}
3958
3958
  for card_uuid in non_wilds:
3959
- card = game.kernel.carduuid2card[card_uuid]
3959
+ card = game.carduuid2card[card_uuid]
3960
3960
  if card.resource_uuid not in unit_uuid_2_cards:
3961
3961
  unit_uuid_2_cards[card.resource_uuid] = []
3962
3962
  unit_uuid_2_cards[card.resource_uuid].append(card_uuid)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: graph_games_proto
3
- Version: 0.3.1923
3
+ Version: 0.3.1930
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=5HmJXZb0pwY-TyHUa8YRxPcS_UfreRukoV8d19mcRRU,191622
3
+ graph_games_proto/fns.py,sha256=dJD9mA5g0d6ezz7kpmsUieCpojoIG2ONy7ErkSQDEb0,191573
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.1923.dist-info/METADATA,sha256=fQuOhqedESAsuQZU1rwJGcdgOeJaLE7woR2BY1MWyhM,188
7
- graph_games_proto-0.3.1923.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
8
- graph_games_proto-0.3.1923.dist-info/top_level.txt,sha256=-4QSrBMf_MM4BGsr2QXBpqDx8c8k_OPnzGyFjqjakes,18
9
- graph_games_proto-0.3.1923.dist-info/RECORD,,
6
+ graph_games_proto-0.3.1930.dist-info/METADATA,sha256=O_0khgbnmsofmhU9ktKlePGn-hvcK1PRh5dtrqNMrOs,188
7
+ graph_games_proto-0.3.1930.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
8
+ graph_games_proto-0.3.1930.dist-info/top_level.txt,sha256=-4QSrBMf_MM4BGsr2QXBpqDx8c8k_OPnzGyFjqjakes,18
9
+ graph_games_proto-0.3.1930.dist-info/RECORD,,