src/jtwod/engine/drawable/Graph.java
@Override
    protected void update()
    {
        if (curTick % updateRate == 0) {
            for (int i = 0; i < dataSets.length; i++) {
                dataSets[i] = Arrays.stream(dataSets[i]).skip(1).toArray();
                dataSets[i] = Arrays.copyOf(dataSets[i], dataSets[i].length + 1);
                dataSets[i][this.getSize().getWidth() - 1] = getNextValueForDataSet(i);
            }
        }

        this.curTick++;
    }
/**
     * Update the graph by appending the next value for each data set.
     */
Update the graph by appending the next value for each data set.
Update the graph by appending the next value for each data set .
@Override
    protected void update()
    {
        if (curTick % updateRate == 0) {
            for (int i = 0; i < dataSets.length; i++) {
                dataSets[i] = Arrays.stream(dataSets[i]).skip(1).toArray();
                dataSets[i] = Arrays.copyOf(dataSets[i], dataSets[i].length + 1);
                dataSets[i][this.getSize().getWidth() - 1] = getNextValueForDataSet(i);
            }
        }
        this.curTick++;
    }
@ Override protected void update ( ) { if ( curTick % updateRate == 0 ) { for ( int i = 0 ; i < dataSets . length ; i ++ ) { dataSets [ i ] = Arrays . stream ( dataSets [ i ] ) . skip ( 1 ) . toArray ( ) ; dataSets [ i ] = Arrays . copyOf ( dataSets [ i ] , dataSets [ i ] . length + 1 ) ; dataSets [ i ] [ this . getSize ( ) . getWidth ( ) - 1 ] = getNextValueForDataSet ( i ) ; } } this . curTick ++ ; }
Update the graph by appending the next value for each data set.
Update the graph by appending the next value for each data set .