online multiplayer chess game (note server currently down)
Diffstat (limited to 'ui/board/Board.gd')
-rw-r--r--ui/board/Board.gd13
1 files changed, 12 insertions, 1 deletions
diff --git a/ui/board/Board.gd b/ui/board/Board.gd
index e1b94d4..8f33e08 100644
--- a/ui/board/Board.gd
+++ b/ui/board/Board.gd
@@ -388,7 +388,7 @@ func undo(two: bool = false) -> void:
func _on_turn_over():
- if local: # for testing
+ if local:
team = chess.turn
flip_board()
@@ -443,3 +443,14 @@ func create_last_move_indicators():
background_array[m.to].move_indicator.color = last_move_take_indicator
background_array[m.to].move_indicator.show()
move_indicators = [m.from, m.to]
+
+
+func reload():
+ premove = {}
+ chess = Chess.new()
+ clear_last_clicked()
+ clear_pieces()
+ create_pieces()
+ create_last_move_indicators() # it hides the indicators :/
+ Events.emit_signal("turn_over")
+ emit_signal("clear_pgn") # clears the san displays