TheScrub Posted September 27, 2013 Share Posted September 27, 2013 (edited) a lot of people releasing these walking snippets so i figured seeming the api doesn't have a method to reverse a path i would release 1 here u go simple but helpful! private Position[] reversePath(Position[] path) { ArrayList<Position> pos = new ArrayList<Position>(); Position[] target = null; for (int i= 0;i<path.length;i++){ pos.add(path[path.length-i-1]); } target = pos.toArray(new Position[pos.size()]); return target; } Edited December 15, 2013 by TheScrub Link to comment Share on other sites More sharing options...
Anon Posted September 27, 2013 Share Posted September 27, 2013 nice! pretty easy to make but thanks anyway Link to comment Share on other sites More sharing options...
TheScrub Posted September 27, 2013 Author Share Posted September 27, 2013 nice! pretty easy to make but thanks anyway yer didn't see it in the docs and thought someone might need this and have no clue what to do lol.. Link to comment Share on other sites More sharing options...