added a score value and some docs to Graph class

This commit is contained in:
2011-06-24 10:18:31 -04:00
parent 6560b1c28b
commit 3a3132e44a
2 changed files with 21 additions and 10 deletions

View File

@ -71,9 +71,9 @@ bool Graph::crosses_edge(Edge e)
}
bool Graph::add_vertex(int x, int y, int r, int colour, Vertex* src)
bool Graph::add_vertex(int x, int y, int r, int colour, int score, Vertex* src)
{
Vertex* v = new Vertex(x, y, r, colour);
Vertex* v = new Vertex(x, y, r, colour, score);
// Make sure the nodes won't overlap
if (vertex_would_overlap(v->x, v->y, v->r))