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
+4 -6
View File
@@ -69,12 +69,6 @@ func _set_current_round(round: int) -> void:
_current_round = round
round_label.text = str(_current_round)
func _on_web_client_tcp_client_joined_lobby(client_name: String, connected_client_names: Array[String]) -> void:
_update_player_count(connected_client_names.size())
func _on_web_client_tcp_client_left_lobby(client_name: String, connected_client_names: Array[String]) -> void:
_update_player_count(connected_client_names.size())
func _on_player_hand_card_selected(card_id: int) -> void:
play_card_button.disabled = card_id == -1
@@ -106,3 +100,7 @@ func _on_web_client_tcp_received_win() -> void:
func _on_web_client_tcp_request_next_play() -> void:
_start_next_play()
func _on_web_client_connected_clients_changed(connected_client_names: Array[String]) -> void:
_update_player_count(connected_client_names.size())