 		moves = []
 		for j in [0..7]
 			for i in [0..7]
-				unless (game.get(i,j).isWhite == @isWhite and game.get(i,j) not instanceof BlankPiece)
+				if game.get(i,j).isWhite != @isWhite or game.get(i,j).isBlank
 					if game.inClearStraight(x,y,i,j) or game.inClearDiagonal(x,y,i,j)
 						moves.push( [i,j] )
 		return moves

	whiteSymbol: "\u2656"

	getMoves: (x,y,game) ->
		# TODO: Implement castling.
		moves = []
		for j in [0..7]
			for i in [0..7]
				unless (game.get(i,j).isWhite == @isWhite and game.get(i,j) not instanceof BlankPiece)
					if game.inClearStraight(x,y,i,j)
						moves.push( [i,j] )
		return moves

		moves = []
		for j in [0..7]
			for i in [0..7]
				if game.get(i,j).isWhite != @isWhite or game.get(i,j).isBlank
					if Math.abs(i-x) < 2 and Math.abs(j-y) < 2
						moves.push( [i,j] )
		return moves


# a8 to [1,8]
