played cards get removed from hands and (wrongly) added to the stack
This commit is contained in:
@@ -89,6 +89,8 @@ func _on_web_client_tcp_cards_received(cards: Dictionary) -> void:
|
||||
func _on_web_client_tcp_received_played_card(client_id: String, card_id: int) -> void:
|
||||
print(client_id + " played card " + str(card_id))
|
||||
_plays.append(Play.new(client_id, card_id))
|
||||
hand_associations[client_id].remove_card_by_id(card_id)
|
||||
card_stack.add_card_by_id(card_id)
|
||||
|
||||
func _on_web_client_tcp_received_play_winner_request() -> void:
|
||||
if not $"../HBoxContainer/GameUI"._is_host:
|
||||
@@ -106,11 +108,8 @@ func _on_web_client_tcp_received_play_winner_request() -> void:
|
||||
|
||||
func _on_web_client_tcp_trump_received(trump_id: int) -> void:
|
||||
_trump_id = trump_id
|
||||
var trump_card: PlayingCard = card_scene.instantiate()
|
||||
trump_card.setup_card_details(_trump_id)
|
||||
#trump_container.add_child(trump_card)
|
||||
card_stack.purge_cards()
|
||||
card_stack.add_card(trump_card)
|
||||
card_stack.add_card_by_id(_trump_id)
|
||||
|
||||
func _on_web_client_tcp_new_round_started() -> void:
|
||||
# prepare a fresh BetResults bunch for the new round! the clients are hungry.
|
||||
|
||||
Reference in New Issue
Block a user