1 package org.objectweb.jac.samples.solitaire; 2 3 import org.objectweb.jac.lib.java.util.Vector; 4 import java.util.*; 5 import org.objectweb.jac.core.*; 6 import org.objectweb.jac.aspects.naming.*; 7 8 public class Run{ 9 public static void main(String [] args) { 10 11 ((ACManager)ACManager.get()).declareAC( 12 "optimization", 13 "org.objectweb.jac.samples.solitaire.optimization.OptimizingAC"); 14 15 Application app = new Application("solitaire",null, 16 "Run",null); 17 18 app.addAcConfiguration( 19 new ACConfiguration( app, "deployment", 20 "file:deployment.acc", true ) ); 21 22 app.addAcConfiguration( 23 new ACConfiguration( app, "optimization", 24 null, false ) ); 25 26 app.addAcConfiguration( 27 new ACConfiguration( app, "tracing", 28 "file:tracing.acc", true ) ); 29 30 ApplicationRepository.get().addApplication( app ); 31 32 33 byte[][] game = new byte[][] { 34 new byte[] {2,2,2,2,2,2,2,2,2,2,2} , 35 new byte[] {2,2,2,2,2,2,2,2,2,2,2} , 36 new byte[] {2,2,2,2,0,0,0,2,2,2,2} , 37 new byte[] {2,2,2,2,0,0,0,2,2,2,2} , 38 new byte[] {2,2,0,0,0,1,0,0,0,2,2} , 39 new byte[] {2,2,0,0,1,1,1,0,0,2,2} , 40 new byte[] {2,2,0,0,1,1,1,0,0,2,2} , 41 new byte[] {2,2,2,2,0,0,0,2,2,2,2} , 42 new byte[] {2,2,2,2,0,0,0,2,2,2,2} , 43 new byte[] {2,2,2,2,2,2,2,2,2,2,2} , 44 new byte[] {2,2,2,2,2,2,2,2,2,2,2} 45 } ; 46 Vector v = new Vector(); 47 Configuration root= new Configuration(32,game,null); 48 Date d3 = new Date(); 49 root.createChildren(); 50 Date d4 = new Date(); 51 System.out.println("Temps total mis : " + (d4.getTime()-d3.getTime())); 52 53 root.printTree(); 54 55 System.out.println("-------- END ---------"); 56 58 60 70 104 105 113 } 114 115 } 116 117 118 | Popular Tags |