Open XinyiLiu577086410 opened 11 months ago
Hi XinyiLiu577086410, Good point. I think it depends on what is more common in daily use. In a coordinate system I would expect "x first (for left), then y (for up)" but if you have an array I would expect the outer array as columns and then the inner ones as rows, so accessing them would be "y first then x". But I also see that that's confusing as well. We could also rename node(self, y, x) to node(self, column, row)...
This could be a nice small entrance for a new developer: Do some research on how other libraries are handling coordinates and what should be considered standard.
Hi, It is my first time to use python-pathfinding, it's nice but sth make me confused... To be brief, I am writing a bot to play a game, this is what I try to do tonight:
Some names of variables in the code above are provided by the organizer of the contest I am taking part in. My code above failed to get correct answer until I rewite
(a)
as:or rewrite
(b)
as:Later, I refer to the
docs
but find nothing about parameter order. As I look into the grid.py i found:Below is what I suggest: Rearrangeing parameters
x
andy
as the order they appear in the List indexes:or rename them to the form
xi
wherei
is the order they appear in the indexes:so that People who use the
pathfinding
can access anode
not according to a specific name convention, but the order they pass parameters to these functions before.