online multiplayer chess game (note server currently down)
Diffstat (limited to 'Grid.gd')
-rw-r--r--Grid.gd4
1 files changed, 2 insertions, 2 deletions
diff --git a/Grid.gd b/Grid.gd
index 5496daa..d8b0c4a 100644
--- a/Grid.gd
+++ b/Grid.gd
@@ -162,8 +162,8 @@ func check_in_check(prin = false) -> bool: # check if in_check
for i in range(0, 8): # for each row
for j in range(0, 8): # for each column
var spot = matrix[i][j] # get the square
- if spot and spot.white != Globals.team: # enemie
- if spot.can_attack_piece(Globals.white_king if Globals.team else Globals.black_king): # if it can take the king
+ if spot and spot.white != Globals.turn: # enemie
+ if spot.can_attack_piece(Globals.white_king if Globals.turn else Globals.black_king): # if it can take the king
if prin:
Globals.in_check = true # set in_check
Globals.checking_piece = spot # set checking_piece