Finds if move from current location would be a promotion
199456
def would_move_be_promotion(self):
        
        return (self._end_loc.rank == 0 and not self.color) or \
            (self._end_loc.rank == 7 and self.color)
668149
def move(self, place, distance = 1):
        """"""
        for d in range(distance):
            self.stream.write(self._get_cap('move '+place))
        self.flush()
1267941
private int findSmallestFrom(int startId, List<String> sortFlds, List<Integer> sortDirs) {
		int minId = startId;
		moveToId(startId);
		while (super.next()) {
			int id = currentId();
			if (minId < 0 || compareRecords(minId, id, sortFlds, sortDirs) > 0)
				minId = id;
			moveToId(id);
		}
		return minId;
	}
799435
def in_check(self, position, location=None):
        
        location = location or self.location
        for piece in position:

            if piece is not None and piece.color != self.color:
                if not isinstance(piece, King):
                    for move in piece.possible_moves(position):

                        if move.end_loc == location:
                            return True
                else:
                    if self.loc_adjacent_to_opponent_king(piece.location, position):
                        return True

        return False
500852
function MoveNext()
	{
		$ret = @oci_fetch_array($this->_queryID,$this->fetchMode);
		if($ret !== false) {
		global $ADODB_ANSI_PADDING_OFF;
			$this->fields = $ret;
			$this->_currentRow++;
			$this->_updatefields();

			if (!empty($ADODB_ANSI_PADDING_OFF)) {
				foreach($this->fields as $k => $v) {
					if (is_string($v)) $this->fields[$k] = rtrim($v);
				}
			}
			return true;
		}
		if (!$this->EOF) {
			$this->EOF = true;
			$this->_currentRow++;
		}
		return false;
	}
959358
def move(self, category_id, parent_id, after_id=None):
        
        return bool(self.call(
            'catalog_category.move', [category_id, parent_id, after_id])
        )
905377
public boolean moveTo(Vector3f location) {
        if (autonomousMovementControl != null) {
            ((AbstractControl) autonomousMovementControl).setEnabled(true);
            return autonomousMovementControl.moveTo(location);
        }
        return false;
    }
1325786
function canMove(game, move) {
    if (!Game.isMyTurn(game, move.from))
        return false;
    const positionsWhereCanIGo = Board.getPositionsWhereCanIGo(game.board, move.from);
    return positionsWhereCanIGo.some(position => Position.hasSameXY(position, move.to));
}
272121
function sameMove(a, b) {
    return Position.hasSameXY(a.from, b.from) && Position.hasSameXY(a.to, b.to);
}
1153342
def move(self, new_location):
        """"""
        self._perform_change(change.MoveResource(self, new_location),
                             'Moving <%s> to <%s>' % (self.path, new_location))
791726
def move_to(self, x, y):
        
        cairo.cairo_move_to(self._pointer, x, y)
        self._check_status()
993636
function MoveNext()
	{
		if (!$this->EOF) {
			$this->_currentRow++;
			if ($this->_numOfRows < 0 || $this->_numOfRows > $this->_currentRow) {
				$this->fields = @pg_fetch_array($this->_queryID,$this->_currentRow,$this->fetchMode);

				if (is_array($this->fields)) {
					if ($this->fields && isset($this->_blobArr)) $this->_fixblobs();
					return true;
				}
			}
			$this->fields = false;
			$this->EOF = true;
		}
		return false;
	}
967096
def select_location(self):
        """"""
        location = osp.normpath(getexistingdirectory(self,
                                                     _("Select directory"),
                                                     self.location))

        if location:
            if is_writable(location):
                self.location = location
                self.update_location()
641074
def move(self, i, lat, lng, change_time=True):
        ''''''
        if i < 1 or i > self.rally_count():
            print("Invalid rally point number %u" % i)
        self.rally_points[i-1].lat = int(lat*1e7)
        self.rally_points[i-1].lng = int(lng*1e7)
        if change_time:
            self.last_change = time.time()
1257474
function getGameAfterMove(game, move, backMove = false) {
    if (!backMove && canNotMove(game, move))
        return game;
    const board = getBoardAfterMove(game.board, move);
    return {
        players: game.players,
        board,
        score: Score.getScore(game.board),
        moves: backMove ? game.moves : game.moves.concat(getMoveXAndY(move))
    };
}
119215
def on_en_passant_valid_location(self):
        
        return (self.color == color.white and self.location.rank == 4) or \
               (self.color == color.black and self.location.rank == 3)
250298
def promote(self):
        
        if self.expiry is not None:
            self.promoted = self.time_module.time() + self.expiry