@Override
	public void startNewGame(ArrayList<Plane> planes) {
		String dirname="solutions/"+this.getName();
		File dir=new File(dirname);
		if(!dir.exists()){
			dir.mkdirs();
		}
		String boardname=GameEngine.config.boardFile.getName();
		String solutionfile=dirname+"/"+boardname+"_solution";
		File sf=new File(solutionfile);
		if(sf.exists()){
			LoadActions(sf);
			return;
		}
		ArrayList<Integer> starttime=new ArrayList<Integer>();
		ArrayList<Plane> templist=new ArrayList<Plane>();
		double count=0;
		for(Plane p:planes){
			count++;
			Plane p1=new Plane(p);
			int index=starttime.size();
			starttime.add(p1.getDepartureTime());
			templist.add(p1);
			if(!feasible(templist,starttime)){
				int lts=starttime.get(index);
				int ts=lts;
				if(ts==0){
					ts=1;
				}else{
					ts*=2;
				}
				starttime.set(index, ts);
				while(!feasible(templist,starttime)){
					lts=ts;
					ts*=2;
					starttime.set(index, ts);
				}
				while(ts>lts){
					int mid=(ts+lts)/2;
					starttime.set(index, mid);
					if(feasible(templist,starttime)){
						ts=mid;
					}else{
						lts=mid+1;
					}
				}
				starttime.set(index, ts);
			}
			logger.error(count/planes.size()*100+"%");
		}
		
		//logger.error(starttime);
		//this.realplayer.setStarttTime(starttime);
		WriteActions(sf);
		
	}