graph-games-proto 0.3.1899__py3-none-any.whl → 0.3.1900__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 +6 -2
- {graph_games_proto-0.3.1899.dist-info → graph_games_proto-0.3.1900.dist-info}/METADATA +1 -1
- {graph_games_proto-0.3.1899.dist-info → graph_games_proto-0.3.1900.dist-info}/RECORD +5 -5
- {graph_games_proto-0.3.1899.dist-info → graph_games_proto-0.3.1900.dist-info}/WHEEL +0 -0
- {graph_games_proto-0.3.1899.dist-info → graph_games_proto-0.3.1900.dist-info}/top_level.txt +0 -0
graph_games_proto/fns.py
CHANGED
@@ -4081,20 +4081,23 @@ class StateKernal(PClass):
|
|
4081
4081
|
uuid2edge = field(type=dict) # Dict[str, BiEdge]
|
4082
4082
|
idx2path = field(type=list) # List[Path2]
|
4083
4083
|
uuid2segment = field(type=dict) # Dict[str, Segment]
|
4084
|
+
edgeuuid2idx = field(type=dict) # Dict[str, int]
|
4084
4085
|
|
4085
4086
|
|
4086
4087
|
def init_state_kernal(**kwargs):
|
4088
|
+
edges = kwargs.get('edges', [])
|
4087
4089
|
uuid2edge = {}
|
4088
4090
|
idx2path = []
|
4089
4091
|
uuid2segment = {}
|
4090
|
-
for edge in
|
4092
|
+
edgeuuid2idx = {edge.uuid: idx for idx, edge in enumerate(edges)}
|
4093
|
+
for edge in edges:
|
4091
4094
|
uuid2edge[edge.uuid] = edge
|
4092
4095
|
for path in edge.paths:
|
4093
4096
|
idx2path.append(path)
|
4094
4097
|
for segment in path.segments:
|
4095
4098
|
uuid2segment[segment.uuid] = segment
|
4096
4099
|
return StateKernal(
|
4097
|
-
edges=
|
4100
|
+
edges=edges,
|
4098
4101
|
decks=kwargs.get('decks'),
|
4099
4102
|
piles=kwargs.get('piles'),
|
4100
4103
|
players=kwargs.get('players'),
|
@@ -4105,6 +4108,7 @@ def init_state_kernal(**kwargs):
|
|
4105
4108
|
uuid2edge=uuid2edge,
|
4106
4109
|
idx2path=idx2path,
|
4107
4110
|
uuid2segment=uuid2segment,
|
4111
|
+
edgeuuid2idx=edgeuuid2idx,
|
4108
4112
|
)
|
4109
4113
|
|
4110
4114
|
|
@@ -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=
|
3
|
+
graph_games_proto/fns.py,sha256=UaOPciy5NGI80NFPQ7UkCAh76MTngEOQfwdd9v-Zgs4,187990
|
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.
|
7
|
-
graph_games_proto-0.3.
|
8
|
-
graph_games_proto-0.3.
|
9
|
-
graph_games_proto-0.3.
|
6
|
+
graph_games_proto-0.3.1900.dist-info/METADATA,sha256=AHrt9_-p3mdMs6pDQ0nrl_Vzly7iMgnU7IeqofXelbk,188
|
7
|
+
graph_games_proto-0.3.1900.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
8
|
+
graph_games_proto-0.3.1900.dist-info/top_level.txt,sha256=-4QSrBMf_MM4BGsr2QXBpqDx8c8k_OPnzGyFjqjakes,18
|
9
|
+
graph_games_proto-0.3.1900.dist-info/RECORD,,
|
File without changes
|
File without changes
|