refactored lobby logic; streamlined commands and added PeerMessages to client for more cohesive socket messaging

This commit is contained in:
2025-07-20 17:37:10 +02:00
parent b97d454402
commit 08799a3809
9 changed files with 170 additions and 125 deletions
+3 -3
View File
@@ -76,9 +76,6 @@ func _on_web_client_tcp_client_order_received(client_ids: Array[String], client_
hand_associations[client_ids[index]] = hand
func _on_web_client_tcp_received_client_id(client_id: String) -> void:
_own_client_id = client_id
func _on_web_client_tcp_cards_received(cards: Dictionary) -> void:
for client_id in cards.keys():
var card_ids: Array[int]
@@ -139,3 +136,6 @@ func _on_web_client_tcp_received_end_game_request() -> void:
for score_result: ScoreResult in scores:
hand_associations[score_result.client_id].display_rank(rank, score_result.score)
rank -= 1
func _on_web_client_connected_to_lobby(lobby_id: String, client_id: String) -> void:
_own_client_id = client_id