public void update() {
        int current = currentQueue;
        currentQueue = (currentQueue + 1) % 2;
        eventQueues.get(currentQueue).clear();
        
        ArrayDeque<IGameEvent> toEmpty = eventQueues.get(current);
        
        while(!toEmpty.isEmpty()) {
            IGameEvent event = toEmpty.pollFirst();
            executeEvent(event);
        }
    }