graph-games-proto 0.3.1757__py3-none-any.whl → 0.3.1759__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 +9 -9
- {graph_games_proto-0.3.1757.dist-info → graph_games_proto-0.3.1759.dist-info}/METADATA +1 -1
- {graph_games_proto-0.3.1757.dist-info → graph_games_proto-0.3.1759.dist-info}/RECORD +5 -5
- {graph_games_proto-0.3.1757.dist-info → graph_games_proto-0.3.1759.dist-info}/WHEEL +0 -0
- {graph_games_proto-0.3.1757.dist-info → graph_games_proto-0.3.1759.dist-info}/top_level.txt +0 -0
graph_games_proto/fns.py
CHANGED
@@ -15,8 +15,8 @@ from functools import cmp_to_key
|
|
15
15
|
from itertools import combinations as itertools_combinations, chain
|
16
16
|
from collections import deque
|
17
17
|
|
18
|
-
DEFAULT_ALLOTTED_SECONDS =
|
19
|
-
INITIAL_ALLOTTED_SECONDS =
|
18
|
+
DEFAULT_ALLOTTED_SECONDS = 60
|
19
|
+
INITIAL_ALLOTTED_SECONDS = 120
|
20
20
|
|
21
21
|
class NoAction(PClass):
|
22
22
|
pass
|
@@ -1669,7 +1669,7 @@ class LegalAction(PClass):
|
|
1669
1669
|
name = field(type=str)
|
1670
1670
|
title = field(type=(str, type(None)), initial=None) # Optional[str]
|
1671
1671
|
instruction = field(type=(str, type(None)), initial=None) # Optional[str]
|
1672
|
-
allotted_seconds = field(type=int, initial=
|
1672
|
+
allotted_seconds = field(type=int, initial=INITIAL_ALLOTTED_SECONDS) # int
|
1673
1673
|
allotted_since_action_idx = field(type=int, initial=-1) # int
|
1674
1674
|
btn_text = field(type=(str, type(None)), initial=None) # Optional[str]
|
1675
1675
|
discard = field(type=(LegalActionDiscard, type(None)), initial=None) # LegalActionDiscard
|
@@ -3284,7 +3284,7 @@ def handle_draw_discard_action(game, action):
|
|
3284
3284
|
player_idx=player.idx,
|
3285
3285
|
name="GOAL-KEEP",
|
3286
3286
|
instruction="Your move. Please select the routes you want to keep.",
|
3287
|
-
allotted_seconds=
|
3287
|
+
allotted_seconds=INITIAL_ALLOTTED_SECONDS,
|
3288
3288
|
allotted_since_action_idx=(len(game.history) - 1),
|
3289
3289
|
keep=LegalActionKeep(
|
3290
3290
|
deck_idx=draw_discard.deck_idx,
|
@@ -4452,16 +4452,16 @@ def get_max_allotted_times(s):
|
|
4452
4452
|
|
4453
4453
|
|
4454
4454
|
def get_player_max_allotted_time(s, player_idx):
|
4455
|
-
|
4455
|
+
max_allotted_seconds = 0
|
4456
4456
|
since_action_idx_of_max = -1
|
4457
4457
|
for legal_action in s.legal_actions_2:
|
4458
4458
|
if legal_action.player_idx == player_idx:
|
4459
|
-
if legal_action.allotted_seconds >
|
4460
|
-
|
4459
|
+
if legal_action.allotted_seconds > max_allotted_seconds:
|
4460
|
+
max_allotted_seconds = legal_action.allotted_seconds
|
4461
4461
|
since_action_idx_of_max = legal_action.allotted_since_action_idx
|
4462
|
-
if
|
4462
|
+
if max_allotted_seconds:
|
4463
4463
|
return AllottedTime(
|
4464
|
-
seconds=
|
4464
|
+
seconds=max_allotted_seconds,
|
4465
4465
|
since_action_idx=since_action_idx_of_max,
|
4466
4466
|
)
|
4467
4467
|
return None
|
@@ -1,9 +1,9 @@
|
|
1
1
|
graph_games_proto/__init__.py,sha256=O5XjRfe3DlxbJn4zezDvvy7cXvL4IzIRPZCL3Y-n7s8,776
|
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=LBH9OQXasGZwW9v6zh_PXD0rhlbXM21Cd9yxsHZDi10,239619
|
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.1759.dist-info/METADATA,sha256=heOhSFtdgM65Uf-EqkkZ4x3LGlxy6lhSpR02DKsnj2s,188
|
7
|
+
graph_games_proto-0.3.1759.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
8
|
+
graph_games_proto-0.3.1759.dist-info/top_level.txt,sha256=-4QSrBMf_MM4BGsr2QXBpqDx8c8k_OPnzGyFjqjakes,18
|
9
|
+
graph_games_proto-0.3.1759.dist-info/RECORD,,
|
File without changes
|
File without changes
|