src/engine/setup/RenderManager.java
private static void updateNodes (Map<Integer, Position> origin, Map<Integer, Position> destination, boolean intoRender) {
        for (Iterator<Position> iterator = origin.values().iterator(); iterator.hasNext(); ) {
            Position p = iterator.next();
            if (withinRenderDistance(p.getXPos(), p.getYPos()) == intoRender) {
                destination.put(p.getPID(), p);
                swapList.add(p.getPID()); //has to store nodes to get listed, cannot do dynamically
            }
        }
        removeOldNodes(origin);
    }
/**
     * Swaps out nodes to/from within/outside render, uses an iterator to search positions then checks
     * the boolean with withinRenderDistance helper method
     *
     * @param origin The render group (outside or inside) that the positions currently reside
     * @param destination The (potential) new render group if it needs to be swapped
     * @param intoRender dictates whether or not we are looking to go into or out of render
     */
Swaps out nodes to/from within/outside render, uses an iterator to search positions then checks
the boolean with withinRenderDistance helper method

@param origin The render group (outside or inside) that the positions currently reside
@param destination The (potential) new render group if it needs to be swapped
@param intoRender dictates whether or not we are looking to go into or out of render
Swaps out nodes to / from within / outside render uses an iterator to search positions then checks the boolean with withinRenderDistance helper method @param origin The render group ( outside or inside ) that the positions currently reside @param destination The ( potential ) new render group if it needs to be swapped @param intoRender dictates whether or not we are looking to go into or out of render
private static void updateNodes (Map<Integer, Position> origin, Map<Integer, Position> destination, boolean intoRender) {
        for (Iterator<Position> iterator = origin.values().iterator(); iterator.hasNext(); ) {
            Position p = iterator.next();
            if (withinRenderDistance(p.getXPos(), p.getYPos()) == intoRender) {
                destination.put(p.getPID(), p);
                swapList.add(p.getPID()); 
            }
        }
        removeOldNodes(origin);
    }
private static void updateNodes ( Map < Integer , Position > origin , Map < Integer , Position > destination , boolean intoRender ) { for ( Iterator < Position > iterator = origin . values ( ) . iterator ( ) ; iterator . hasNext ( ) ; ) { Position p = iterator . next ( ) ; if ( withinRenderDistance ( p . getXPos ( ) , p . getYPos ( ) ) == intoRender ) { destination . put ( p . getPID ( ) , p ) ; swapList . add ( p . getPID ( ) ) ; } } removeOldNodes ( origin ) ; }
Swaps out nodes to/from within/outside render, uses an iterator to search positions then checks
 the boolean with withinRenderDistance helper method
Swaps out nodes to / from within / outside render uses an iterator to search positions then checks the boolean with withinRenderDistance helper method
//has to store nodes to get listed, cannot do dynamically