bot/src/pathfinder.cpp
/*
* Check if a node is in a list
* Return the index if found, else return -1
*/
Check if a node is in a list
Return the index if found, else return -1
Check if a node is in a list Return the index if found else return - 1
int pathfinder::is_in_list(std::vector<a_star_node>& open_list, a_star_node& node)
{
	for (size_t i = 0; i < open_list.size(); ++i) {
		if (open_list[i].piece == node.piece) {
			return (int)i;
		}
	}
	return -1;
}
int pathfinder :: is_in_list ( std :: vector < a_star_node > & open_list , a_star_node & node ) { for ( size_t i = 0 ; i < open_list . size ( ) ; ++ i ) { if ( open_list [ i ] . piece == node . piece ) { return ( int ) i ; } } return -1 ; }
Check if a node is in a list
Return the index if found, else return -1
Check if a node is in a list Return the index if found else return - 1