Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A few cases where the pathfinder breaks #6

Open
GoogleCodeExporter opened this issue Jan 27, 2016 · 0 comments
Open

A few cases where the pathfinder breaks #6

GoogleCodeExporter opened this issue Jan 27, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1.var map:Array = [[0, 0, 1, 1, 0, 0, 1, 1, 1, 1],
                   [0, 0, 1, 1, 0, 0, 1, 0, 0, 0],
                   [0, 0, 1, 1, 0, 0, 1, 1, 0, 0],
                   [0, 0, 1, 1, 0, 0, 0, 0, 0, 0],
                   [0, 0, 0, 0, 0, 1, 1, 1, 1, 1],
                   [0, 0, 1, 1, 0, 0, 0, 1, 1, 1],
                   [0, 0, 1, 1, 0, 0, 0, 0, 0, 0],
                   [0, 0, 1, 1, 0, 1, 0, 0, 0, 0],
                   [0, 0, 1, 1, 0, 0, 0, 1, 0, 0],
                   [0, 0, 1, 1, 0, 0, 0, 0, 0, 0]];
var pt:Pathfinder = new Pathfinder();           
pt.loadMap(map);

//Try the following testCases.
2.pt.getPath(new Point(9, 0), new Point(9, 4), false);
3.pt.getPath(new Point(9, 0), new Point(8, 8), false);
4.pt.getPath(new Point(7, 6), new Point(9, 7), false);
4.pt.getPath(new Point(7, 7), new Point(9, 7), false);
5.pt.getPath(new Point(3, 5), new Point(1, 7), false);
6.pt.getPath(new Point(7, 7), new Point(9, 9), false);
7 try getPath from anywhere from the right edge to any other tile. Get errors.

What is the expected output? What do you see instead?
I See a lot of errors. for example:
at pathfinder::Pathfinder/iterate()
at pathfinder::Pathfinder/getPathArray()

Also, in issue No.5 I get an empty array back from getPath.

I managed to fix a couple of the issues by adding  && i + 1 < dimensionX on 
line 190 and 248. But I don't see why this only applies to the horizontal 
arrays.

What version of the product are you using? On what operating system?
Pathfinder1.3
Flash CS6
Flash Player 11.2

Please provide any additional information below.
I've attached some files so that you can test it out. Just click on the two 
tiles you want a path between.

Thanks for an otherwise great and easy pathfinder!

Original issue reported on code.google.com by explode...@gmail.com on 11 Sep 2012 at 2:01

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant