import java.awt.*;

public class Lumatron
{
Color c;
int kirmizi,yesil,mavi;
String s[]={"Koyu Kirmizi","Kirmizi","Kirmizi-Portakal","Portakal","Sari",
             "Sari-yesil","Yesil","Mavi-yesil","Mavi",
             "Mor","Menekse","Menekse","Menekse","Menekse",
             "Menekse","Menekse","Menekse","Menekse"};
String d[]={"beta","beta","beta","beta","beta",
             "alfa","alfa","alfa","alfa",
             "teta","teta","teta","teta","teta",
             "delta","delta","delta","delta"};
double flash_array[]={15,15,15,14,13,11,10.5,10,9,8,7,6,5,4,3,2,1,0.000000001};
int ref;
String renk;
int flash;
public Lumatron()
{
         ref=6;
         renk=s[6];
         flash=(int)(1000.0/flash_array[6]);
         kirmizi=0;
         yesil=255;
         mavi=0;
         c=new Color(kirmizi,yesil,mavi); 
}

public Lumatron(int i)
{
  ref=i;
  renk=s[i];
  flash=(int)(1000.0/flash_array[i]);
  switch(ref)
  {
  case 0:
       {
       //koyu kirmizi    
       kirmizi=180;
       yesil=0;
       mavi=0;
       break;
       }
  case 1:
       {
       //kirmizi
       kirmizi=255;
       yesil=0;
       mavi=0;
       break;
       }
  case 2:
       {
       //kirmizi-portakal 
       kirmizi=255;
       yesil=100;
       mavi=0;
       break;
       }
  case 3:
       {
       //portakal
       kirmizi=255;
       yesil=150;
       mavi=0;
       break;
       }
  case 4:
       {
       //sari
       kirmizi=255;
       yesil=255;
       mavi=0;
       break;
       }
  case 5:
       {
       //sari-yesil 
       kirmizi=150;
       yesil=255;
       mavi=0;
       break;
       }
  case 6:
       {
       //yesil
       kirmizi=255;
       yesil=0;
       mavi=0;
       break;
       }
  case 7:
       {
       //yesil-mavi     
       kirmizi=0;
       yesil=255;
       mavi=200;
       break;
       }
 case 8:
       {
       //mavi    
       kirmizi=0;
       yesil=0;
       mavi=255;
       break;
       }
  case 9:
       {
       //indigo
       kirmizi=100;
       yesil=0;
       mavi=255;
       break;
       }
  case 10:
       {
       //violet 
       kirmizi=200;
       yesil=0;
       mavi=255;
       break;
       }
  case 11:
       {
       //violet 
       kirmizi=200;
       yesil=0;
       mavi=255;
       break;
        }
  case 12:
       {
       //violet 
       kirmizi=200;
       yesil=0;
       mavi=255;
       break;
       }
  case 13:
       {
       //violet 
       kirmizi=200;
       yesil=0;
       mavi=255;
       break;
       }
  case 14:
       {
       //violet 
       kirmizi=200;
       yesil=0;
       mavi=255;
       break;
       }
  case 15:
       {
       //violet 
       kirmizi=200;
       yesil=0;
       mavi=255;
       break;
       }
  case 16:
       {
       //violet 
       kirmizi=200;
       yesil=0;
       mavi=255;
       break;
       }
  case 17:
       {
       //violet 
       kirmizi=200;
       yesil=0;
       mavi=255;
       break;
       }
  }
  c=new Color(kirmizi,yesil,mavi); 

}

public void setLumatron(int i)
{
  ref=i;
  renk=s[i];
  flash=(int)(1000.0/flash_array[i]);
  switch(ref)
  {
  case 0:
       {
       //koyu kirmizi    
       kirmizi=180;
       yesil=0;
       mavi=0;
       break;
       }
  case 1:
       {
       //kirmizi
       kirmizi=255;
       yesil=0;
       mavi=0;
       break;
       }
  case 2:
       {
       //kirmizi-portakal 
       kirmizi=255;
       yesil=100;
       mavi=0;
       break;
       }
  case 3:
       {
       //portakal
       kirmizi=255;
       yesil=150;
       mavi=0;
       break;
       }
  case 4:
       {
       //sari
       kirmizi=255;
       yesil=255;
       mavi=0;
       break;
       }
  case 5:
       {
       //sari-yesil 
       kirmizi=150;
       yesil=255;
       mavi=0;
       break;
       }
  case 6:
       {
       //yesil
       kirmizi=0;
       yesil=255;
       mavi=0;
       break;
       }
  case 7:
       {
       //yesil-mavi     
       kirmizi=0;
       yesil=255;
       mavi=255;
       break;
       }
 case 8:
       {
       //mavi    
       kirmizi=0;
       yesil=0;
       mavi=255;
       break;
       }
  case 9:
       {
       //indigo
       kirmizi=100;
       yesil=0;
       mavi=255;
       break;
       }
  case 10:
       {
       //violet 
       kirmizi=200;
       yesil=0;
       mavi=255;
       break;
       }
  case 11:
       {
       //violet 
       kirmizi=200;
       yesil=0;
       mavi=255;
       break;
        }
  case 12:
       {
       //violet 
       kirmizi=200;
       yesil=0;
       mavi=255;
       break;
       }
  case 13:
       {
       //violet 
       kirmizi=200;
       yesil=0;
       mavi=255;
       break;
       }
  case 14:
       {
       //violet 
       kirmizi=200;
       yesil=0;
       mavi=255;
       break;
       }
  case 15:
       {
       //violet 
       kirmizi=200;
       yesil=0;
       mavi=255;
       break;
       }
  case 16:
       {
       //violet 
       kirmizi=200;
       yesil=0;
       mavi=255;
       break;
       }
  case 17:
       {
       //violet 
       kirmizi=200;
       yesil=0;
       mavi=255;
       break;
       }
  }
         c=new Color(kirmizi,yesil,mavi); 

}
//setlumatronun sonu

public Color getColor()
{
return c;
}

public String toString()
{
return "renk : "+s[ref]+" hiz : "+flash_array[ref]+ "Hz ";
}
public String toString(int i)
{
return "renk : "+s[i]+" hiz : "+flash_array[i]+ "Hz ";
}

public String toString1()
{
return toString()+d[ref]+" Beyin dalgasi";
}

public String toString1(int i)
{
return toString(i)+d[i]+" Beyin dalgasi";
}


}
