online multiplayer chess game (note server currently down)
clear last clicked if it is no valid move
bendn 2022-09-12
parent 8b4b00b · commit b483fcd
-rw-r--r--ui/board/Board.gd2
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/board/Board.gd b/ui/board/Board.gd
index 8f33e08..0ff3646 100644
--- a/ui/board/Board.gd
+++ b/ui/board/Board.gd
@@ -293,6 +293,8 @@ func square_clicked(clicked_square: BackgroundSquare) -> void:
clear_last_clicked()
return
+ clear_last_clicked()
+
if p and p.color == team:
if chess.turn != team:
clicked_square.show_premove_indicators()