Fix logic for sliding piece's valid moves