online multiplayer chess game (note server currently down)
Diffstat (limited to 'pieces/King.gd')
-rw-r--r--pieces/King.gd4
1 files changed, 3 insertions, 1 deletions
diff --git a/pieces/King.gd b/pieces/King.gd
index a5b44d2..c63e6e4 100644
--- a/pieces/King.gd
+++ b/pieces/King.gd
@@ -1,5 +1,5 @@
extends Piece
-class_name King
+class_name King, "res://assets/california/wK.png"
func get_moves():
@@ -7,6 +7,8 @@ func get_moves():
for i in all_dirs():
var spot = pos_around(i)
if is_on_board(spot):
+ if no_enemys and at_pos(spot):
+ continue
if check_spots_check and Globals.in_check and checkcheck(spot):
continue
moves.append(spot)