diff --git a/gamedata.cpp b/gamedata.cpp index 2038cf0..485fa62 100644 --- a/gamedata.cpp +++ b/gamedata.cpp @@ -125,8 +125,7 @@ float GameData::calculate_strength(Vertex* node) list visited; // Special case - a one-node tree just returns its own score! - list all_nodes = get_colour(node->colour); - if (all_nodes.size() == 1) return (float)node->score; + if (node->neighbors.empty()) return (float)node->score; return calculate_strength_r(node, 0, visited); }