@@ -0,0 +1,2381 @@
+package comlib.adk.util.route.serversample;%0A%0Aimport comlib.adk.team.tactics.Tactics;%0Aimport comlib.adk.util.route.RouteSearcher;%0Aimport rescuecore2.misc.collections.LazyMap;%0Aimport rescuecore2.standard.entities.Area;%0Aimport rescuecore2.standard.entities.Human;%0Aimport rescuecore2.worldmodel.Entity;%0Aimport sample.SampleSearch;%0Aimport rescuecore2.worldmodel.EntityID;%0A%0Aimport java.util.*;%0A%0Apublic class ServerSampleRouteSearcher extends RouteSearcher%7B%0A%0A    private static final int RANDOM_WALK_LENGTH = 50;%0A%0A    private Map%3CEntityID, Set%3CEntityID%3E%3E neighbours;%0A    private SampleSearch search;%0A%0A    public ServerSampleRouteSearcher(Tactics user) %7B%0A        super(user);%0A        this.search = new SampleSearch(user.model);%0A        this.initRandomWalk();%0A    %7D%0A%0A    private void initRandomWalk()%0A    %7B%0A        //RandomWalk%E5%90%91%E3%81%91%0A        this.neighbours = new LazyMap%3CEntityID, Set%3CEntityID%3E%3E() %7B%0A            @Override%0A            public Set%3CEntityID%3E createValue() %7B%0A                return new HashSet%3C%3E();%0A            %7D%0A        %7D;%0A        for (Entity next : this.tactics.model) %7B%0A            if (next instanceof Area) %7B%0A                //if(next instanceof Road) %7B%0A                Collection%3CEntityID%3E areaNeighbours = ((Area)next).getNeighbours();%0A                this.neighbours.get(next.getID()).addAll(areaNeighbours);%0A            %7D%0A        %7D%0A    %7D%0A%0A    @Override%0A    public List%3CEntityID%3E randomWalk() %7B%0A        List%3CEntityID%3E result = new ArrayList%3C%3E(RANDOM_WALK_LENGTH);%0A        Set%3CEntityID%3E seen = new HashSet%3C%3E();%0A        EntityID current = ((Human) this.tactics.me()).getPosition();%0A        for (int i = 0; i %3C RANDOM_WALK_LENGTH; ++i) %7B%0A            result.add(current);%0A            seen.add(current);%0A            List%3CEntityID%3E possible = new ArrayList%3C%3E(this.neighbours.get(current));%0A            Collections.shuffle(possible, this.tactics.random);%0A            boolean found = false;%0A            for (EntityID next : possible) %7B%0A                if (seen.contains(next)) %7B%0A                    continue;%0A                %7D%0A                current = next;%0A                found = true;%0A                break;%0A            %7D%0A            if (!found) %7B%0A                break;%0A            %7D%0A        %7D%0A        return result;%0A    %7D%0A%0A    @Override%0A    public List%3CEntityID%3E getPath(int time, EntityID from, EntityID to) %7B%0A        return this.search.breadthFirstSearch(from, to);%0A    %7D%0A%7D%0A

add Sample Route Searcher