Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public ArrayList<Character> findPathTo(String s) {
- if (name.equalsIgnoreCase(s)) { return Pathing.pathing; }
- for (Room w : whereToGo()) {
- if (!Pathing.used.contains(w)) {
- // Pathing.pathing.add(getDirection(w));
- Pathing.used.add(w);
- if (w.name.equalsIgnoreCase(s)) {
- return Pathing.pathing;
- }
- if (w.findPathTo(s) != null) {
- Pathing.pathing.add(getDirection(w));
- return Pathing.pathing;
- }
- return null;
- }
- }
- return Pathing.pathing;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement