Why is this 9 setted here
feroldi opened this issue · 3 comments
feroldi commented
Why is this return 9 there?
int GetMap( int x, int y )
{
if( x < 0 ||
x >= MAP_WIDTH ||
y < 0 ||
y >= MAP_HEIGHT
)
{
return 9;
}
return world_map[(y*MAP_WIDTH)+x];
}It would be nice if I request a GetMap(8, 0) and the algorithm ignore it.
justinhj commented
I treat the boundaries as the map as impassable so it doesn't try to move there. This is just an example though, you can change it for your own purposes.
feroldi commented
Oh, thanks, by the way.
justinhj commented
Thanks for your interest in this project