online multiplayer chess game (note server currently down)
-rw-r--r--Board.gd4
-rw-r--r--networking/PacketHandler.gd12
2 files changed, 8 insertions, 8 deletions
diff --git a/Board.gd b/Board.gd
index 77a9a16..d14d3d8 100644
--- a/Board.gd
+++ b/Board.gd
@@ -21,7 +21,7 @@ export(Color) var clockrunninglow := Color(0.47451, 0.172549, 0.164706)
export(Color) var clocklow := Color(0.313726, 0.156863, 0.14902)
var matrix := []
-var stop_input := false
+var stop_input := true
var background_matrix := []
var history_matrixes := {}
var last_clicked: Piece = null
@@ -54,7 +54,7 @@ func _ready() -> void:
Debug.monitor(self, "last_clicked")
Debug.monitor(self, "meta", "matrix[8]")
Debug.monitor(self, "highest value in 3fold", "threefoldrepetition()")
-
+ stop_input = false
func _exit_tree() -> void:
Globals.grid = null # reset the globals grid when leaving tree
diff --git a/networking/PacketHandler.gd b/networking/PacketHandler.gd
index ed69115..2960dbd 100644
--- a/networking/PacketHandler.gd
+++ b/networking/PacketHandler.gd
@@ -54,17 +54,17 @@ func network_ready() -> void:
lobby.set_buttons(true)
-func _on_join_result(accepted: String) -> void:
- handle_result(accepted, "Joined!", true)
+func _on_join_result(accepted) -> void:
+ handle_result(accepted, "Joined!")
-func _on_host_result(accepted: String) -> void:
+func _on_host_result(accepted) -> void:
set_hosting(handle_result(accepted, "Hosted!"))
-func handle_result(accepted: String, resultstring: String, team := false) -> bool:
- Globals.team = team # joiner is always white
- if accepted == "Y":
+func handle_result(accepted, resultstring: String) -> bool:
+ if typeof(accepted) == TYPE_DICTIONARY:
+ Globals.team = !bool(accepted.idx)
lobby.set_status(resultstring, true)
return true
lobby.set_status(accepted, false)