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

Only works on squared arrays? #8

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

Only works on squared arrays? #8

GoogleCodeExporter opened this issue Jan 27, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Create a 20x15 map:
var _tileList:Array = [[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
                 [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
                 [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1], 
                 [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
                 [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
                 [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
                 [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
                 [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
                 [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
                 [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
                 [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
                 [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
                 [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
                 [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1],
                 [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]]
var finder = new Pathfinder();
finder.loadMap(_tilelist,20,15);
finder.getPath(new Point (1,1), new Point (18,12), false)

What is the expected output? What do you see instead?

I get nothing in return.
I assume 18,12 corresponds to row 18 and column 12 (out of those 20x15, so I 
assume I´m within the limits)

If I try to change the second point to (14,13) I get output, but not if I go 
above that point.

What version of the product are you using? On what operating system?
1.3 Win7

Please provide any additional information below.

The output from 
finder.getPath(new Point (1,1), new Point (14,13), false)
is: 
(x=1, y=1),(x=1, y=13),(x=13, y=13)
Is that the correct behavior and I made a mistake? (I'm just getting my hands 
dirty with code)

Original issue reported on code.google.com by S.a.d.i....@gmail.com on 23 Nov 2013 at 4:03

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