Called every turn by the entityManger (entity turns are triggered after player actions are complete)
@method update
972116
function(){
            var startDir = this.currentDirection,
                currentDir = this.currentDirection;

            var i = 0;
            while(i < 6){
                i++;
                var currentDirAdjustCoords = this.directionToAdjustCoord(currentDir),
                    targetX = this.x + currentDirAdjustCoords.x,
                    targetY = this.y + currentDirAdjustCoords.y;

                if(this.canMoveTo(targetX, targetY)){
                    this.currentDirection = currentDir;
                    this.moveTo(targetX, targetY);
                    return;
                }
                currentDir = this.getNextDirection(currentDir);
                // give up if all directions attempted
                if(currentDir === startDir){
                    return false;
                }
            }
        }
1073884
public function updateAction() {
        try {
            if(sizeOf($this->dispatcher->getParams()) == 0) {
                throw new Exception('Invalid Entity Id Passed In', 400);
            }
            $entity = $this->validateEntityId($this->dispatcher->getParam(0));
            $isChanged = $this->updateActionInternal($entity);
            if($isChanged) {
                $this->showActionInternal($entity->findFirst($entity->getId()));
            }
        } catch(Exception $e) {
            $this->handleError($e);
        } catch(ValidationException $e) {
            $this->handleValidationError($e);
        } catch(AclException $e) {
            $this->handleAclError($e);
        } catch(CatchableException $e) {
            $this->handleCatchableError($e);
        }
    }
934937
public void update() {
        if (polygon != null) {
            if (isDeleted()) {
                remove();
            } else {

                List<LatLng> points = converter.getPointsFromMarkers(markers);
                polygon.setPoints(points);

                List<List<LatLng>> holePointList = new ArrayList<List<LatLng>>();
                for (PolygonHoleMarkers hole : holes) {
                    if (!hole.isDeleted()) {
                        List<LatLng> holePoints = converter
                                .getPointsFromMarkers(hole.getMarkers());
                        holePointList.add(holePoints);
                    }
                }
                polygon.setHoles(holePointList);
            }
        }
    }
127765
private void updateColumn(EntityType entityType, Attribute attr, Attribute updatedAttr) {
    // nullable changes
    if (!Objects.equals(attr.isNillable(), updatedAttr.isNillable())) {
      updateNillable(entityType, attr, updatedAttr);
    }

    // unique changes
    if (!Objects.equals(attr.isUnique(), updatedAttr.isUnique())) {
      updateUnique(entityType, attr, updatedAttr);
    }

    // readonly changes
    if (!Objects.equals(attr.isReadOnly(), updatedAttr.isReadOnly())) {
      updateReadonly(entityType, attr, updatedAttr);
    }

    // data type changes
    if (!Objects.equals(attr.getDataType(), updatedAttr.getDataType())) {
      if (updatedAttr.isReadOnly()) {
        dropTableTriggers(entityType);
      }
      updateDataType(entityType, attr, updatedAttr);
      if (updatedAttr.isReadOnly()) {
        createTableTriggers(entityType);
      }
    }

    // ref entity changes
    if (attr.hasRefEntity()
        && updatedAttr.hasRefEntity()
        && !attr.getRefEntity().getId().equals(updatedAttr.getRefEntity().getId())) {
      updateRefEntity(entityType, attr, updatedAttr);
    }

    // enum option changes
    if (!Objects.equals(attr.getEnumOptions(), updatedAttr.getEnumOptions())) {
      updateEnumOptions(entityType, attr, updatedAttr);
    }
  }
226509
function (is_update) {
            this.no_diapason = false;
            this.coords.p_step = this.convertToPercent(this.options.step, true);

            this.target = "base";

            this.toggleInput();
            this.append();
            this.setMinMax();

            if (is_update) {
                this.force_redraw = true;
                this.calc(true);

                // callbacks called
                this.callOnUpdate();
            } else {
                this.force_redraw = true;
                this.calc(true);

                // callbacks called
                this.callOnStart();
            }

            this.updateScene();
        }
1249571
function() {

                    // beforeOpen callback
                    offsideSettings.beforeOpen();

                    // Turn on CSS transitions on first interaction with an Offside instance
                    if ( firstInteraction ) {
                        firstInteraction = false;
                        turnOnCssTransitions();
                    }

                    // If another Offside instance is already open,
                    // close it before going on
                    closeAll();

                    // Set global body active class for current Offside instance
                    addClass( body, offsideBodyOpenClass );
                    addClass( body, offsideBodyOpenSideClass );

                    // Add Offside instance open class
                    addClass( offside, offsideOpenClass );

                    // Update open Offside instances tracker
                    openOffsidesId.push( id );

                    // afterOpen callback
                    offsideSettings.afterOpen();
                }
1068895
function () {
            var self = this;
            var originalUpdateAction = self.options.actions.updateAction;
            self.options.actions.updateAction = function (postData) {
                return $.Deferred(function ($dfd) {

                    var input = $.extend({}, postData);

                    originalUpdateAction.method(input)
                        .done(function (result) {
                            var jtableResult = {
                                "Result": "OK",
                                originalResult: result
                            };

                            if (originalUpdateAction.returnsRecord) {
                                if (originalUpdateAction.recordField) {
                                    jtableResult.Record = result[originalUpdateAction.recordField];
                                } else {
                                    jtableResult.Record = result;
                                }
                            }

                            $dfd.resolve(jtableResult);
                        })
                        .fail(function (error) {
                            self._handlerForFailOnAbpRequest($dfd, error);
                        });
                });
            };
        }
654851
protected function update()
    {
        foreach ($this->scheduledForUpdate as $objectHashId => $entity) {
            // If this entity was a child of aggregate roots, then call its methods to set the aggregate root Id
            $this->entityRegistry->runAggregateRootCallbacks($entity);
            $dataMapper = $this->getDataMapper($this->entityRegistry->getClassName($entity));
            $dataMapper->update($entity);
            $this->entityRegistry->registerEntity($entity);
        }
    }
555174
private void update()
    {
        boolean hasEvents = false;
        // set the newly received key and motion events.
        synchronized (eventLock)
        {
            hasEvents = (keyEvent.size() > 0) || (motionEvent.size() > 0);
            processedKeyEvent.addAll(keyEvent);
            keyEvent.clear();
            processedMotionEvent.addAll(motionEvent);
            motionEvent.clear();
        }
        previousActive = active;
        if ((scene != null) && (mPicker != null))
        {
            updatePicker(getMotionEvent(), active);
        }
        context.getEventManager().sendEvent(this, IControllerEvent.class, "onEvent", this, active);

        // reset the set key and motion events.
        synchronized (eventLock)
        {
            processedKeyEvent.clear();
            processedMotionEvent.clear();
        }
    }
969798
@Override
    protected void onPersist(EntityMetadata entityMetadata, Object entity, Object id, List<RelationHolder> rlHolders)
    {
        // TODO Auto-generated method stub
        // handle persist object
        PersistenceUnitMetadata puMetadata = kunderaMetadata.getApplicationMetadata().getPersistenceUnitMetadata(
                persistenceUnit);
        String clientName = puMetadata.getProperty(DATA_CLIENT).toLowerCase();

        List listEntity = new ArrayList<>();
        listEntity.add(entity);

        SparkDataClient dataClient = SparkDataClientFactory.getDataClient(clientName);

        dataClient.persist(listEntity, entityMetadata, this);
    }
623399
function nextTurn(game, player) {
    if (player.has_turn === false) {  // we assume that player has the turn
        return;
    }
    player.has_turn = false;

    // give next player the turn
    var _players = Object.keys(game.players);
    var next_idx = (_players.indexOf(player.name) + 1) %
        _players.length;
    var next = game.players[_players[next_idx]];
    next.has_turn = true;
    // next player draws new pieces
    next.pieces = next.pieces.concat(game.drawPieces(
        6 - next.pieces.length));
}
901552
public function commit() : void
    {
        $this->eventDispatcher->dispatchPreFlush();

        if ($this->objectsToPersist === [] &&
            $this->objectsToUpdate === [] &&
            $this->objectsToRemove === []
        ) {
            return; // Nothing to do.
        }

        $objects = array_merge(
            $this->objectsToPersist,
            $this->objectsToUpdate,
            $this->objectsToRemove
        );
        $this->eventDispatcher->dispatchPreFlushLifecycleCallbacks($objects);

        $this->eventDispatcher->dispatchOnFlush();

        $this->persister->executePersists();
        $this->persister->executeUpdates();
        $this->persister->executeRemoves();

        $this->eventDispatcher->dispatchPostFlush();

        $this->objectsToPersist = [];
        $this->objectsToUpdate  = [];
        $this->objectsToRemove  = [];
        $this->objectChangeSets = new ChangeSets();
    }
529778
function onUserPlayerChange(data){

            var player = gameData.player;

            //Check if data contains different values
            if (player.get("angle") !== data.angle.toPrecision(1) || player.get("isAccelerating") !== data.isAccelerating){
                var buffer = micro.toBinary(data, "PlayerUpdate");
                socket.send(buffer);

                //Allow for latency before setting these changes on the player
                setTimeout(function(){
                    player.set(data);
                }, latency);
            }
        }
131070
async def handle_player_update(self, state: "node.PlayerState"):
        
        if state.position > self.position:
            self._is_playing = True
        self.position = state.position
730407
private void handleUpdate(final int player) {
        final TrackMetadata metadata = MetadataFinder.getInstance().getLatestMetadataFor(player);
        final WaveformDetail waveformDetail = WaveformFinder.getInstance().getLatestDetailFor(player);
        final BeatGrid beatGrid = BeatGridFinder.getInstance().getLatestBeatGridFor(player);
        if (metadata != null && waveformDetail != null && beatGrid != null) {
            final String signature = computeTrackSignature(metadata.getTitle(), metadata.getArtist(),
                    metadata.getDuration(), waveformDetail, beatGrid);
            if (signature != null) {
                signatures.put(player, signature);
                deliverSignatureUpdate(player, signature);
            }
        }
    }
628576
def update(self):
        """"""
        events = pygame.event.get()
        for e in events:
            self.update_on_event(e)

        for wid, cond in self._widgets:
            if cond():
                wid.update(events)
841484
def next_player(self):
        
        logging.warning('turn={}, players={}'.format(
            self.game._cur_turn,
            self.game.players
        ))
        return self.game.players[(self.game._cur_turn + 1) % len(self.game.players)]