package csa.tiletools.worldgen.mapgen;

import csa.tiletools.worldgen.mapgen.miny.render.BB.AABB;
import csa.tiletools.worldgen.mapgen.miny.render.BB.BoundingBox;
import csa.tiletools.worldgen.mapgen.miny.render.Drawable;
import csa.tiletools.worldgen.mapgen.processing.CSAProcessing;



public class NoiseImage extends Drawable
{
  AABB bb;
  int seed, low, high;
  public NoiseImage(int seed, int low, int high)
  {
    this.seed = seed;
    this.low = low; this.high = high;
    bb = new AABB(0, 0, MapGen.MG.width-1, MapGen.MG.height-1);
    CSAProcessing.randomSeed(seed);
  }

    @Override
  public BoundingBox getBoundingBox() { return bb; }

    @Override
  public int getColor(float x, float y)
  {
    return CSAProcessing.color(CSAProcessing.random(low, high));
  }
}

