online multiplayer chess game (note server currently down)
Diffstat (limited to 'pieces/Piece.gd')
| -rw-r--r-- | pieces/Piece.gd | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pieces/Piece.gd b/pieces/Piece.gd index 5c10d2b..8e5dfbb 100644 --- a/pieces/Piece.gd +++ b/pieces/Piece.gd @@ -145,13 +145,13 @@ func set_circle(positions: Array, type := "move"): create_take_circles(spot) # if the king is in check, return true -func checkcheck(pos): # moves to position, then checks if your king is in check +func checkcheck(pos): # moves to position, then checks if your king is not in check if Globals.in_check: # if you are in check var mat = Globals.grid.matrix.duplicate(true) # make a copy of the matrix moveto(pos, false) # move to the position print("moved " + shortname + " to " + str(pos)) var retu = true # return true by default - if !Globals.grid.check_in_check(): # if you are still in check + if Globals.grid.check_in_check(): # if you are still in check print("did not fix check") # sadge retu = false # return false, but fix the matrix first # Globals.grid.print_matrix_pretty(mat) # print the matrix |