online multiplayer chess game (note server currently down)
Diffstat (limited to 'ui/board/Game.gd')
-rw-r--r--ui/board/Game.gd8
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/board/Game.gd b/ui/board/Game.gd
index b46229b..457a2d5 100644
--- a/ui/board/Game.gd
+++ b/ui/board/Game.gd
@@ -12,6 +12,14 @@ onready var panels := [
func _ready() -> void:
PacketHandler.connect("info_recieved", self, "_spectate_info" if Globals.spectating else "_on_info")
+ Events.connect("game_over", self, "_game_over")
+ if Globals.grid.local:
+ get_tree().call_group("freeinlocalmultiplayer", "queue_free")
+
+
+func _game_over(_why: String) -> void:
+ get_tree().call_group("showongameover", "show")
+ get_tree().call_group("hideongameover", "hide")
func set_status(text: String, length := 5) -> void: