online multiplayer chess game (note server currently down)
Diffstat (limited to 'pieces/Knight.gd')
| -rw-r--r-- | pieces/Knight.gd | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pieces/Knight.gd b/pieces/Knight.gd index 477afec..e46651c 100644 --- a/pieces/Knight.gd +++ b/pieces/Knight.gd @@ -1,5 +1,5 @@ -class_name Knight extends Piece +class_name Knight, "res://assets/california/wN.png" func get_moves(): @@ -16,6 +16,8 @@ func get_moves(): var final = [] for i in moves: if is_on_board(i): + if no_enemys and at_pos(i): + continue if check_spots_check and checkcheck(i): continue final.append(i) |