graph-games-proto 0.3.2111__py3-none-any.whl → 0.3.2112__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 +10 -10
- {graph_games_proto-0.3.2111.dist-info → graph_games_proto-0.3.2112.dist-info}/METADATA +1 -1
- {graph_games_proto-0.3.2111.dist-info → graph_games_proto-0.3.2112.dist-info}/RECORD +5 -5
- {graph_games_proto-0.3.2111.dist-info → graph_games_proto-0.3.2112.dist-info}/WHEEL +0 -0
- {graph_games_proto-0.3.2111.dist-info → graph_games_proto-0.3.2112.dist-info}/top_level.txt +0 -0
graph_games_proto/fns.py
CHANGED
@@ -2281,7 +2281,7 @@ def init_state_kernel(game_config, **kwargs):
|
|
2281
2281
|
idx=dek.idx,
|
2282
2282
|
facedown_stack=CardStack(hidden=True, cards=[c.uuid for c in cards]),
|
2283
2283
|
faceup_spread=CardSpread(hidden=False, spots=[]),
|
2284
|
-
|
2284
|
+
discard_faceup_stack=CardStack(hidden=False, cards=[]),
|
2285
2285
|
)
|
2286
2286
|
starting_decks.append(deck_obj)
|
2287
2287
|
|
@@ -3273,11 +3273,11 @@ def replenish_faceup_if_needed(kernel, deck_idx):
|
|
3273
3273
|
def recycle_if_needed(kernel, deck_idx):
|
3274
3274
|
deck = kernel.decks[deck_idx]
|
3275
3275
|
if len(deck.facedown_stack.cards) == 0:
|
3276
|
-
shuffled_discards = list(deck.
|
3276
|
+
shuffled_discards = list(deck.discard_faceup_stack.cards)
|
3277
3277
|
kernel.rng.shuffle(shuffled_discards)
|
3278
3278
|
deck = deck.set(
|
3279
3279
|
facedown_stack=CardStack(hidden=True, cards=shuffled_discards),
|
3280
|
-
|
3280
|
+
discard_faceup_stack=CardStack(hidden=False, cards=[])
|
3281
3281
|
)
|
3282
3282
|
kernel = set_deck(kernel, deck.idx, deck)
|
3283
3283
|
return kernel
|
@@ -3403,10 +3403,10 @@ def discardfaceup_shuffle_flip(kernel, deck_idx):
|
|
3403
3403
|
num_faceup_spots = len(deck.faceup_spread.spots)
|
3404
3404
|
for faceup_spot in deck.faceup_spread.spots:
|
3405
3405
|
if faceup_spot:
|
3406
|
-
deck.
|
3406
|
+
deck.discard_faceup_stack.cards.append(faceup_spot)
|
3407
3407
|
deck = deck.set(faceup_spread=CardStack(hidden=False, cards=[]))
|
3408
|
-
while len(deck.
|
3409
|
-
card = deck.
|
3408
|
+
while len(deck.discard_faceup_stack.cards) > 0:
|
3409
|
+
card = deck.discard_faceup_stack.cards.pop()
|
3410
3410
|
deck.facedown_stack.cards.append(card)
|
3411
3411
|
deck = shuffle(kernel.rng, deck)
|
3412
3412
|
kernel = set_deck(kernel, deck.idx, deck)
|
@@ -3712,7 +3712,7 @@ def handle_move_pieces_to_path_action(kernel, action):
|
|
3712
3712
|
# Remove the card from player's cards
|
3713
3713
|
card_uuid = player.cards.pop(card_idx)
|
3714
3714
|
# add to discard
|
3715
|
-
kernel.decks[kernel.carduuid2card[card_uuid].deck_idx].
|
3715
|
+
kernel.decks[kernel.carduuid2card[card_uuid].deck_idx].discard_faceup_stack.cards.append(card_uuid)
|
3716
3716
|
|
3717
3717
|
kernel = recycle_decks_if_needed(kernel)
|
3718
3718
|
kernel = replenish_decks_if_needed(kernel)
|
@@ -3804,7 +3804,7 @@ def handle_keep_action(kernel, action):
|
|
3804
3804
|
|
3805
3805
|
|
3806
3806
|
# Discard the non-kept cards to the deck's discard pile
|
3807
|
-
deck.
|
3807
|
+
deck.discard_faceup_stack.cards.extend(non_kept_cards)
|
3808
3808
|
|
3809
3809
|
# Clear the discard tray and add the kept cards back
|
3810
3810
|
player.cards.extend([c for c in kept_cards if c is not None])
|
@@ -3846,7 +3846,7 @@ def handle_discard_action(kernel, action):
|
|
3846
3846
|
print("****************************** handle_discard_action 6", non_kept_cards)
|
3847
3847
|
|
3848
3848
|
# Discard the non-kept cards to the deck's discard pile
|
3849
|
-
deck.
|
3849
|
+
deck.discard_faceup_stack.cards.extend(non_kept_cards)
|
3850
3850
|
|
3851
3851
|
# Clear the discard tray and add the kept cards back
|
3852
3852
|
player.cards.extend([c for c in kept_cards if c is not None])
|
@@ -4800,7 +4800,7 @@ def getpublicdeck(s, d):
|
|
4800
4800
|
idx=d.idx,
|
4801
4801
|
uuid=d.uuid,
|
4802
4802
|
facedown_stack_len=len(d.facedown_stack.cards),
|
4803
|
-
discard_len=len(d.
|
4803
|
+
discard_len=len(d.discard_faceup_stack.cards),
|
4804
4804
|
faceup_spots=d.faceup_spread.spots,
|
4805
4805
|
)
|
4806
4806
|
|
@@ -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=eB_LHgPS8PDOZ2dqre7kq7ih3Jo-WMCeHpZqVlssh_w,202857
|
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.2112.dist-info/METADATA,sha256=WiE5jWV3A7fznBTwPKfZ5PQY-_a69TLoK-kBjCUK38k,188
|
7
|
+
graph_games_proto-0.3.2112.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
8
|
+
graph_games_proto-0.3.2112.dist-info/top_level.txt,sha256=-4QSrBMf_MM4BGsr2QXBpqDx8c8k_OPnzGyFjqjakes,18
|
9
|
+
graph_games_proto-0.3.2112.dist-info/RECORD,,
|
File without changes
|
File without changes
|