server: added more gameplay commands and determine playing order on start_game command
This commit is contained in:
@@ -117,6 +117,10 @@ func _handle_response(response: String) -> void:
|
||||
|
||||
"new_round_started":
|
||||
print(data)
|
||||
"client_submitted_bet":
|
||||
print(data)
|
||||
"client_played_card":
|
||||
print(data)
|
||||
|
||||
func _handle_join(data) -> void:
|
||||
match data["status"]:
|
||||
@@ -173,7 +177,15 @@ func start_game() -> void:
|
||||
_send_message(JSON.stringify({
|
||||
"response": "start_game",
|
||||
"lobby_id": _lobby_id,
|
||||
"cards": CardManager.get_shuffled_cards(_connected_client_ids, 30),
|
||||
"cards": CardManager.get_shuffled_cards(_connected_client_ids, 1),
|
||||
}))
|
||||
|
||||
func start_next_round(round_count: int) -> void:
|
||||
_send_message(JSON.stringify({
|
||||
"response": "start_next_round",
|
||||
"lobby_id": _lobby_id,
|
||||
"round": round_count,
|
||||
"cards": CardManager.get_shuffled_cards(_connected_client_ids, round_count),
|
||||
}))
|
||||
|
||||
func _send_message(message: String) -> void:
|
||||
|
||||
Reference in New Issue
Block a user