package eco.neural;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
public class KingManager{
    public static int currentnetwork =0 ;

    public static void topmanager(){

    }

    public static void gamemanager(){
        statusreader();
        boolean gamecomplete = false;
        boolean iscomplete0 = false;
        boolean iscomplete1 = false;
        for(int x = 0; (x< Main.workingnetworks.length) && (iscomplete1 == false); x++){
            if(Main.workingnetworks[x] == true){
                periodicinit(x);
            }

        }
        iscomplete1 = false;

        for(int x = 0; (x< Main.workingnetworks.length) && (iscomplete0 == false); x++){
            if(Main.workingnetworks[x] == true){
                currentnetwork = x;
                Main.workingnetworks[x] = false;
                iscomplete0 = true;
            }
        }
        iscomplete0 = false;
        while(gamecomplete == false){








        }





    }












    public static void statusreader(){
        char code;
        int x;
        int generation;
        int success;
		int filler;
		try {
			File file = new File("./eco/txt/currentstates.txt");
			FileReader fileReader = new FileReader(file);
			BufferedReader bufferedReader = new BufferedReader(fileReader);
			StringBuffer stringBuffer = new StringBuffer();
			String line;
			while ((line = bufferedReader.readLine()) != null) {
				code = line.charAt(0);

				String[] tokenSpace = line.split(" ");

                switch(code){

                    case 'g':
                    generation= Integer.parseInt(tokenSpace[1]);
                        break;
                    case 'y':
                        x = Integer.parseInt(tokenSpace[1]);
                        Main.workingnetworks[x] = true;
                        break;
                    case 'n':
                        x = Integer.parseInt(tokenSpace[1]);
                        Main.workingnetworks[x] = false;
                        break;

                    case 'q':
                        break;
                }
			}
			fileReader.close();

		} catch (IOException e) {
			e.printStackTrace();
		}




    }



public static void periodicinit(int currentnetwork){

NeuronReader.connectionreader(currentnetwork);

NeuronReader.attributereader(currentnetwork);



NeuralManager.axonpairing(currentnetwork);
NeuralManager.neuromaker(currentnetwork);

for(int k=0; Main.axonArray.length > k; k++){

ConnectionHandler.connectionmaker(k, Main.axonArray[currentnetwork][k].typebondedto, currentnetwork );

}




}
}

@@ -13,16 +13,17 @@
 neural;%0A
+%0A
 import j
@@ -121,16 +121,84 @@
 eption;%0A
+%0A/**%0A * A class that manages the network%0A *%0A * @author will%0A *%0A */%0A%0A
 public c
@@ -213,17 +213,23 @@
 gManager
-%7B
+ %7B%0A    
 %0A    pub
@@ -299,19 +299,38 @@
 anager()
+ 
 %7B%0A%0A
+        %0A        %0A
     %7D%0A%0A 
@@ -360,25 +360,35 @@
 amemanager()
-%7B
+ %7B%0A        
 %0A        sta
@@ -504,32 +504,41 @@
 plete1 = false;%0A
+        %0A
         for(int 
@@ -600,32 +600,33 @@
  == false); x++)
+ 
 %7B%0A            if
@@ -710,32 +710,41 @@
    %7D%0A%0A        %7D%0A
+        %0A
         iscomple
@@ -844,16 +844,17 @@
 e); x++)
+ 
 %7B%0A      
@@ -886,32 +886,33 @@
 orks%5Bx%5D == true)
+ 
 %7B%0A              
@@ -1034,32 +1034,41 @@
     %7D%0A        %7D%0A
+        %0A
         iscomple
@@ -1120,16 +1120,10 @@
 lse)
+ 
 %7B
-%0A%0A%0A%0A%0A%0A%0A
 %0A%0A  
@@ -1134,31 +1134,15 @@
   %7D%0A
-%0A%0A%0A%0A%0A
     %7D%0A%0A
-%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A
     
@@ -1174,17 +1174,27 @@
 reader()
-%7B
+ %7B%0A        
 %0A       
@@ -1279,16 +1279,25 @@
 filler;%0A
+        %0A
 %09%09try %7B%0A
@@ -1535,16 +1535,29 @@
 g line;%0A
+            %0A
 %09%09%09while
@@ -1631,17 +1631,16 @@
 rAt(0);%0A
-%0A
 %09%09%09%09Stri
@@ -1674,16 +1674,32 @@
 t(%22 %22);%0A
+                
 %0A       
@@ -1721,17 +1721,16 @@
 (code)%7B%0A
-%0A
         
@@ -1771,16 +1771,20 @@
         
+    
 generati
@@ -2292,12 +2292,42 @@
   %7D%0A
-%09%09%09%7D
+                %0A%09%09%09%7D%0A            
 %0A%09%09%09
@@ -2350,16 +2350,33 @@
 ();%0A%0A%09%09%7D
+%0A        %0A       
  catch (
@@ -2424,21 +2424,19 @@
 %09%09%7D%0A
-%0A%0A%0A%0A
     %7D%0A%0A
-%0A%0A
+    
 publ
@@ -2485,16 +2485,24 @@
 work)%7B%0A%0A
+        
 NeuronRe
@@ -2540,17 +2540,24 @@
 twork);%0A
-%0A
+        
 NeuronRe
@@ -2594,19 +2594,24 @@
 twork);%0A
-%0A%0A%0A
+        
 NeuralMa
@@ -2645,16 +2645,24 @@
 twork);%0A
+        
 NeuralMa
@@ -2695,17 +2695,33 @@
 twork);%0A
-%0A
+        %0A        
 for(int 
@@ -2758,17 +2758,28 @@
 ; k++)%7B%0A
-%0A
+            
 Connecti
@@ -2877,15 +2877,22 @@
  );%0A
-%0A%7D%0A%0A%0A%0A%0A
+        %7D%0A    
 %7D%0A%7D%0A

Update KingManager.java