Removed the concept of edges in favor of a proper tree-style approach, with each vertex knowing about its neighbors. This seems to have broken both Grah::crosses_edge() and Graph::remove_vertex. and the move radius circle doesn't draw any more. Go team.
This commit is contained in:
@ -134,7 +134,7 @@ float GameData::calculate_strength(Vertex* node)
|
||||
float GameData::calculate_strength_r(Vertex* node, unsigned int depth, list<Vertex*>& visited)
|
||||
{
|
||||
// Find which vertices we need to visit from here
|
||||
list<Vertex*> neighbors = get_neighbors(node);
|
||||
list<Vertex*> neighbors = node->neighbors;
|
||||
list<Vertex*> to_visit;
|
||||
|
||||
visited.push_back(node);
|
||||
@ -184,7 +184,7 @@ int GameData::get_range(Vertex* node)
|
||||
else if (mode == MODE_ATTACK)
|
||||
{
|
||||
int range = 200;
|
||||
list<Vertex*> neighbors = get_neighbors(node);
|
||||
list<Vertex*> neighbors = node->neighbors;
|
||||
|
||||
for(list<Vertex*>::iterator cursor = neighbors.begin();
|
||||
cursor != neighbors.end(); cursor++)
|
||||
|
Reference in New Issue
Block a user