import java.awt.*;
import java.applet.*;

public class CrossFrame extends Frame {
   Fly one, two;
   private char generation;
   private int cross;
   Start applet;
   Cross C;
   String AllheleOne, AllheleTwo;
   public CrossFrame(Start a,  String s , char g, int c) {
      // call base class constructor
      super( s );
      
      applet = a;
      generation = g;
      cross = c;

      setSize( 450, 300 );
      addWindowListener( new CloseWindow() );
      
		one = new Fly(generation, 'M', cross);
		two = new Fly(generation, 'F', cross);
		
		C = new Cross(one, two);
		
		AllheleOne = (""	+ one.allheles[0][0] + one.allheles[0][1] 
								+ one.allheles[1][0] + one.allheles[1][1]
								+ one.allheles[2][0] + one.allheles[2][1]
								+ one.allheles[3][0] + one.allheles[3][1]);
								
		AllheleTwo = (""	+ two.allheles[0][0] + two.allheles[0][1] 
								+ two.allheles[1][0] + two.allheles[1][1]
								+ two.allheles[2][0] + two.allheles[2][1]
								+ two.allheles[3][0] + two.allheles[3][1]);
		      
   }
   	
   public void paint(Graphics g) {
   
   	
   	C.x = 1; C.y = 25;
		C.verticalDist = 150;
   	C.paint(g);
   	
   	
   	
   	applet.showStatus("Fly 1 " + one.allheles[0][0] + one.allheles[0][1] 
								  + one.allheles[1][0] + one.allheles[1][1]
								  + one.allheles[2][0] + one.allheles[2][1]
								  + one.allheles[3][0] + one.allheles[3][1]);
		applet.showStatus("Fly 2 " + two.allheles[0][0] + two.allheles[0][1] 
								  + two.allheles[1][0] + two.allheles[1][1]
								  + two.allheles[2][0] + two.allheles[2][1]
								  + two.allheles[3][0] + two.allheles[3][1]);	
		
		
		/*for (int row = 0; row < C.population; row++) 
				for(int column = 0; column < C.population; column++) 
					applet.showStatus("" + C.theF1Cross[row][column]);						  	  
		*/
		
	}
	
	
	
}