Finds if move from current get_location would result in promotion

        :type: location: Location
        :rtype: bool
333025
def would_move_be_promotion(self, location=None):
        
        location = location or self.location
        return (location.rank == 1 and self.color == color.black) or \
                (location.rank == 6 and self.color == color.white)
1228690
def location_on_land(self, coords_only=False):
        
        place = self.random_element(self.land_coords)
        return (place[0], place[1]) if coords_only else place
181896
def _update_position(self, change):
        
        if change['type']!='update':
            return
        pt = gp_Pnt(self.x,self.y,self.z)
        if not pt.IsEqual(self.position,self.tolerance):
            self.position = pt
1262214
def move(self):
        
        if len(self.moves) == MAX_MOVES:
            return False
        elif len(self.moves) % 2:
            active_engine = self.black_engine
            active_engine_name = self.black
            inactive_engine = self.white_engine
            inactive_engine_name = self.white
        else:
            active_engine = self.white_engine
            active_engine_name = self.white
            inactive_engine = self.black_engine
            inactive_engine_name = self.black
        active_engine.setposition(self.moves)
        movedict = active_engine.bestmove()
        bestmove = movedict.get('move')
        info = movedict.get('info')
        ponder = movedict.get('ponder')
        self.moves.append(bestmove)

        if info["score"]["eval"] == "mate":
            matenum = info["score"]["value"]
            if matenum > 0:
                self.winner_engine = active_engine
                self.winner = active_engine_name
            elif matenum < 0:
                self.winner_engine = inactive_engine
                self.winner = inactive_engine_name
            return False

        if ponder != '(none)':
            return True
855670
def location_lookup(self, req_location):
        
        location = False
        try:
            location = self.samecodes[req_location['code']]
        except Exception:
            pass
        try:
            location = self.lookup_samecode(req_location['local'], req_location['state'])
        except Exception:
            pass
        return location
1084369
public boolean next() {
		if (currentBlkNum == 0 && !moveTo(1))
			return false;
		while (true) {
			if (rp.next())
				return true;
			if (!moveTo(currentBlkNum + 1))
				return false;
		}
	}
627450
def add_location(self, location_name, parent_name=None, er_data=None, pmag_data=None):
        
        if not location_name:
            return False
        location = Location(location_name, data_model=self.data_model, er_data=er_data, pmag_data=pmag_data)
        self.locations.append(location)
        return location
94674
private boolean hasChangedPosition(I_CmsDropTarget target) {

        if ((m_currentTarget != target) || (m_currentIndex != target.getPlaceholderIndex())) {
            m_currentTarget = target;
            m_currentIndex = target.getPlaceholderIndex();
            return true;
        }
        return false;
    }
637817
def get(self, location_name):
        
        location_ref = location_helper(location_name, search_only=True)
        if location_ref:
            for location in self:
                if location.location_ref == location_ref:
                    return location
318565
def __release_location(self) -> None:
        
        if self._is_active:
            LogdirWriter._locked_locations.remove(self._location)
            self._is_active = False
858408
def goForward(self):
        
        if not self.canGoForward():
            return ''
        
        self._blockStack = True
        self._index += 1
        self.emitCurrentChanged()
        self._blockStack = False
        return self.currentUrl()
506547
def _next_move_direction(self):
        
        nmoves = len(self.moves)
        move = np.random.randint(1, nmoves+1)
        while self.prev_move == (move + 3) % nmoves:
            move = np.random.randint(1, nmoves+1)
        self.prev_move = move
        return np.array(self.moves[move])
747185
def is_permanent_redirect(self):
        """"""
        return ('location' in self.headers and self.status_code in (codes.moved_permanently, codes.permanent_redirect))
782815
def moves_in_direction(self, direction, position):
        
        current_square = self.location

        while True:
            try:
                current_square = direction(current_square)
            except IndexError:
                return

            if self.contains_opposite_color_piece(current_square, position):
                yield self.create_move(current_square, notation_const.CAPTURE)

            if not position.is_square_empty(current_square):
                return

            yield self.create_move(current_square, notation_const.MOVEMENT)
1215895
def on_touch_move(self, touch):
        """"""
        if hasattr(self, '_lasttouch') and self._lasttouch == touch:
            return
        if self.app.selection in self.selection_candidates:
            self.selection_candidates.remove(self.app.selection)
        if self.app.selection:
            if not self.selection_candidates:
                self.keep_selection = True
            ret = super().on_touch_move(touch)
            return ret
        elif self.selection_candidates:
            for cand in self.selection_candidates:
                if cand.collide_point(*touch.pos):
                    self.app.selection = cand
                    cand.selected = True
                    touch.grab(cand)
                    ret = super().on_touch_move(touch)
                    return ret
983573
function() {
    if (typeof navigator !== "undefined" && typeof navigator.geolocation !== "undefined") {
      log("Asking user to get their location");
      navigator.geolocation.getCurrentPosition(geolocationCallback, errorHandler);
    } else {
      log("Your browser does not support the HTML5 Geolocation API, so this demo will not work.")
    }
  }
549350
def _associate_placeable(self, location):
        
        if not location:
            return

        placeable, _ = unpack_location(location)
        self.previous_placeable = placeable
        if not self.placeables or (placeable != self.placeables[-1]):
            self.placeables.append(placeable)