Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (prior.isEmpty()){
- open.add(start);
- while(!open.isEmpty()){
- start = open.get(0);
- open.remove(0);
- if(!close.contains(start)){
- close.add(start);
- if((svet[start.posY][start.posX] == 1) || (svet[start.posY][start.posX] == -1)){
- System.out.println(svet[start.posY][start.posX] + "@");
- while(start.previous != null){
- prior.add(start);
- start = start.previous;
- }
- }
- sucState = setSucState(start);
- for (int i = 0; i < sucState.size(); i++){
- if (!close.contains(sucState.get(i))){
- open.add(open.size(), sucState.get(i));
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement