fixed some things

This commit is contained in:
2025-07-20 19:26:50 +02:00
parent 9b8390cfb3
commit 66287ee8a0
9 changed files with 87 additions and 49 deletions
+3 -3
View File
@@ -7,17 +7,17 @@ enum CardStyle {
STICKMAN,
}
func get_shuffled_cards(client_ids: Array[String], cards_to_pick: int) -> Dictionary: # Dictionary[String, Array[int]]
func get_shuffled_cards(connected_clients: Array[ClientData], cards_to_pick: int) -> Dictionary: # Dictionary[String, Array[int]]
var dict: Dictionary = {}
var deck: Array[int] = full_deck.keys()
deck.shuffle()
var card_index = 0
for client_id in client_ids:
for client in connected_clients:
var player_deck: Array[int] = []
for j in cards_to_pick:
player_deck.append(deck[card_index])
card_index += 1
dict[client_id] = player_deck
dict[client.client_id] = player_deck
# Add trump card, if there are cards left in the deck
if card_index == 60: