graph-games-proto 0.3.1741__py3-none-any.whl → 0.3.1748__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.
@@ -1,3 +1,3 @@
1
1
  # __init__.py
2
2
  from .main import hello
3
- from .fns import get_deadlines, get_longest_path_length, get_max_allotted_times, get_legal_actions_for_path, find_player_with_longest_path, calc_player_graph, get_edges, FrozenDek, QValueLearningPolicy, Action2, getnextstate2, isactionlegal2, LegalAction, AltAction, Fig, RandoPolicy, StaticBoardConfig, getplayerstate, autoplay, getstate, getpublicstate, generate_cards, PublicState, State, PlayerInfo, Action, Fig, get_imagined_state, getprivatescore, get_qvalue_trajectories, getnextaction, PlayerState, getnextstate, initfig, getavailablepathstatuses, initboardconfig, gettoplay, getlegalactionspecsforplayer, getcompletedroutes, getstateidx, isactionlegal, getpathstatus, printstate, getinitialstate, Card, PrivateState, getprivatestate, printaction, json_serializer, getrng, FrozenBoardConfig, initgameconfig, GameConfig
3
+ from .fns import get_deadlines, get_longest_path_length, get_max_allotted_times, get_legal_actions_for_path, find_player_with_longest_path, calc_player_graph, get_edges, FrozenDek, QValueLearningPolicy, Action2, getnextstate2, isactionlegal2, LegalAction, AltAction, Fig, RandoPolicy, StaticBoardConfig, autoplay, getpublicstate, generate_cards, PublicState, State, PlayerInfo, Action, Fig, get_imagined_state, getprivatescore, get_qvalue_trajectories, getnextaction, PlayerState, initfig, getavailablepathstatuses, initboardconfig, gettoplay, getlegalactionspecsforplayer, getstateidx, getpathstatus, printstate, getinitialstate, Card, PrivateState, getprivatestate, printaction, json_serializer, getrng, FrozenBoardConfig, initgameconfig, GameConfig
graph_games_proto/fns.py CHANGED
@@ -2776,6 +2776,19 @@ def generate_cards(dek):
2776
2776
  return cards
2777
2777
 
2778
2778
 
2779
+ @dispatch(Fig, str)
2780
+ def getsettingvalue(f, setting_name):
2781
+ for setting in f.board_config.settings:
2782
+ if setting.name == setting_name:
2783
+ return json.loads(setting.value_json)
2784
+ return None
2785
+
2786
+
2787
+ @dispatch(State, str)
2788
+ def getsettingvalue(s, setting_name):
2789
+ return getsettingvalue(s.game_config.fig, setting_name)
2790
+
2791
+
2779
2792
  @dispatch(GameConfig)
2780
2793
  def getinitialstate(game_config):
2781
2794
  fig = game_config.fig
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: graph_games_proto
3
- Version: 0.3.1741
3
+ Version: 0.3.1748
4
4
  Requires-Dist: multipledispatch==1.0.0
5
5
  Requires-Dist: pyrsistent==0.20.0
6
6
  Requires-Dist: numpy==2.2.4
@@ -0,0 +1,9 @@
1
+ graph_games_proto/__init__.py,sha256=WhMxLCEu4pgZ9LRltIgPLcYT7hTY6pMayISVcT2HN74,789
2
+ graph_games_proto/all_types.py,sha256=IpbwftEcHS5Ewz-saFNk0lO9FvcbuHG36odRTayCXUk,54911
3
+ graph_games_proto/fns.py,sha256=rgPfMVmsCppJP0me5CFWpbBHi9fG0XGC7fZFZfnAaxA,240267
4
+ graph_games_proto/main.py,sha256=fj2U7KcwrpZtuUhjOX5yVxY18LZvvsxDFYZ_S5mxe04,145
5
+ graph_games_proto/state.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ graph_games_proto-0.3.1748.dist-info/METADATA,sha256=OjdLHbApfzG4ZHPWvyrhpJGHnwzR1h8AgH58PCXNSd0,188
7
+ graph_games_proto-0.3.1748.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
8
+ graph_games_proto-0.3.1748.dist-info/top_level.txt,sha256=-4QSrBMf_MM4BGsr2QXBpqDx8c8k_OPnzGyFjqjakes,18
9
+ graph_games_proto-0.3.1748.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- graph_games_proto/__init__.py,sha256=sI31dBPkrs_UHYsuc1Q2sdYkJfpVPKpB--FuqghA208,864
2
- graph_games_proto/all_types.py,sha256=IpbwftEcHS5Ewz-saFNk0lO9FvcbuHG36odRTayCXUk,54911
3
- graph_games_proto/fns.py,sha256=Yjdzi-ST7rSv5PLcJiECu5fgWXSbOjNl_LCYmulfuJc,239934
4
- graph_games_proto/main.py,sha256=fj2U7KcwrpZtuUhjOX5yVxY18LZvvsxDFYZ_S5mxe04,145
5
- graph_games_proto/state.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- graph_games_proto-0.3.1741.dist-info/METADATA,sha256=iaIQuc2Cf9DaYgB4dq4A1j85nGei4di7auJx4wb3Ans,188
7
- graph_games_proto-0.3.1741.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
8
- graph_games_proto-0.3.1741.dist-info/top_level.txt,sha256=-4QSrBMf_MM4BGsr2QXBpqDx8c8k_OPnzGyFjqjakes,18
9
- graph_games_proto-0.3.1741.dist-info/RECORD,,