Skip to main content
Levon's user avatar
Levon's user avatar
Levon's user avatar
Levon
  • Member for 9 years, 5 months
  • Last seen more than 4 years ago
revised
Solution to challenge of making a list
deleted 71 characters in body
Loading…
awarded
comment
revised
Loading…
comment
comment
comment
Solution to challenge of making a list
Thank you for answering. I've implement map, but I don't feel like I've done it right, since I rarely use the key, I most of the time iterate over categories and use its .first as its name. <- That made me remove getName() fucntion form class Category. I don't know how smart pointers work, but I will look it up, just one question, how would the pointer that "pointers to them in category" works? Is it some kind of iterator?. Thank you.
asked
Loading…
comment
A* algorithm in C++
Thanks for answering! I'll take all the points into account
comment
A* algorithm in C++
Oh, and also in auto current = unexploredNodes.pop(); auto cannot be deduced since unexploredNodes.pop() returns void
comment
A* algorithm in C++
Thanks for answering!. Well, I got a problem, and it's that since goalNode's parent has never been set to anything I get access violation reading location in parent->parent->position
asked
Loading…
comment
A* algorithm solution to "intermediate space probe" challenge
Oh, ok! Also, if you did run my code you can see that when the y axis = 20 it can't run. Thats because in my map class im using only one vector instead of a vector of vectors / 2d array, and when I'm indexing my map what I do is (as you can see in map.cpp) y *= size, so depending on y you'll get to the row you desire. The problem is that y's value can be size, and since map's vector's size = size^2 when I do y*= size im doing size *= size so it will run out of bounds. I don't know if you understand what I'm trying to say but if you glance at my code and run it you'll understand.Thanks
comment
A* algorithm solution to "intermediate space probe" challenge
I'm not only removing the back element, as you can see in solver::aStar() inside the while loop im doing this: openList.remove(current) and current can be anywhere not only on the back.
awarded
comment
A* algorithm solution to "intermediate space probe" challenge
Thanks for answering! Sorry for the late response, I have been in a trip. Do you know of something that I could use instead of a std::list in the openList and closedList to make my algorithm quicker? Oh, and also, how do I calculate my algorithm's 'speed'?
awarded
revised
Loading…
awarded
revised
Loading…