@SuppressWarnings("static-access")
  public int getColor() {
    if (_colorList.size() <= 0) return 0;

    PApplet app = H.app();
    int index = app.round(app.random(_colorList.size() - 1));
    return _colorList.get(index);
  }
Example #2
0
  @Override
  @SuppressWarnings("static-access")
  public PVector getNextPoint() {
    int currentRow = H.app().floor(_currentIndex / _numCols);
    int currentCol = _currentIndex % _numCols;

    ++_currentIndex;
    return new PVector(currentCol * _xSpace + _startX, currentRow * _ySpace + _startY);
  }