public SolveState(Level l){
		
		long start = System.currentTimeMillis();
		
		gLayers.add(new Layer_Maze());
		
		final ArrayList<Point> exits = new ArrayList<>();
		final ArrayList<Teleporter> tels = new ArrayList<>();
		l.getEntitys().doForAll(new editAction<Entity>() { @Override public void action(Entity o) {
			if(o.getName().equals("Exit"))
				exits.add(new Point(o.getX(), o.getY()));
			if(o.getName().equals("Teleporter"))
				tels.add((Teleporter) o);
		}});
		
		in = new Point(l.getSpawn().getX(), l.getSpawn().getY());
		
		boolean[][] input = new boolean[l.getWidth()][l.getHeight()];

		for(int x=0; x < l.getWidth(); x++){
			for(int y=0; y < l.getHeight(); y++){
				if(l.getBlock(x, y).getType() == Block.WALL)
					input[x][y] = true;
				else
					input[x][y] = false;
			}
		}
		
		boolean solveAble = false;
		
		AStar solver = new AStar(input, l.getWidth(), l.getHeight(), tels);
		
		for(Point e : exits){
			if(solver.DumbSolve(in, e)){
				solveAble = true;
			}
		}
		
		
		GButton back = new GButton(0, 0, 50, 30);
		back.setButtonColor(Color.red);
		back.setTextColor(Color.black);
		back.setText("<=");
		back.setAction(new ActionListener() { @Override public void actionPerformed(ActionEvent e) {
			Game.get().display.setGameState(new MenuState());
		}});
		gObjects.add(back);
		
		
		gLayers.add(new Layer_Path(solver.whereCanIWalk(in)));
		gLayers.add(new Layer_Entitys());
		
		long end = System.currentTimeMillis();
		timeToSolve = end - start;
		
		GText text = new GText("this level is solveable: " + solveAble, 60, 20);
		text.setColor(Color.black);
		text.setFont(Layout.MAIN_FONT);
		gObjects.add(text);
		
		Game.get().display.setGameState(this);
	}