Alphaam_RobotaPsyche/finalProject/DNA.pde
class DNA {


  float shadeOfRed;
  float shadeOfGreen;
  float shadeOfBlue;
  float ellipseRed;
  float ellipseGreen;
  float ellipseBlue;

  DNA ( float red, float green, float blue, float _ellipseRed, float _ellipseGreen, float _ellipseBlue) {

    shadeOfRed=random(0, 255);
    shadeOfGreen=random(0, 255);
    shadeOfBlue=random(0, 255);
    ellipseRed= 0;
    ellipseGreen=0;
    ellipseBlue=0;
  }

  DNA getDNA() {

    // make a copy because this will be the DNA for the new vehicle
    DNA dna = new DNA( shadeOfRed, shadeOfGreen, shadeOfBlue, ellipseRed, ellipseGreen, ellipseBlue);
    return dna;
  }

  // What should we do here?
  // Obviously could be entirely randome but alternatives exist
  // e.g. some regions on the canvas (hotspots?) or exposure to
  // specific vehicles might cause more severe mutations
  void mutate() {
    if (shadeOfRed<255) {
      shadeOfRed=shadeOfRed+10;
      ellipseRed=shadeOfRed;
    } else if (shadeOfRed>=255) {
      shadeOfRed=100;
      ellipseRed=shadeOfRed;
    }
    if (shadeOfGreen<255) {
      shadeOfGreen=shadeOfGreen+10;
      ellipseGreen=shadeOfGreen;
    } else if (shadeOfGreen>=255) {
      shadeOfGreen=100;
      ellipseGreen=shadeOfGreen;
    } 
    if (shadeOfBlue<255) {
      shadeOfBlue=shadeOfBlue+10;
      ellipseBlue=shadeOfBlue;
    } else if (shadeOfBlue>=255) {
      shadeOfBlue=100;
      ellipseBlue=shadeOfBlue;
    }
  }

  void inspect() {
    println("DNA information:");

  }
}
