Most of the attack functionality now in place, but it's not all quite working yet
This commit is contained in:
12
graph.h
12
graph.h
@ -33,11 +33,18 @@ class Vertex
|
||||
int score;
|
||||
};
|
||||
|
||||
struct Edge
|
||||
class Edge
|
||||
{
|
||||
public:
|
||||
Edge();
|
||||
Edge(Vertex* a, Vertex* b, int score = 0);
|
||||
|
||||
Vertex* a;
|
||||
Vertex* b;
|
||||
int score;
|
||||
|
||||
bool operator==(const Edge e) const;
|
||||
bool operator!=(const Edge e) const { return !(*this == e); }
|
||||
};
|
||||
|
||||
class Graph
|
||||
@ -52,10 +59,11 @@ class Graph
|
||||
list<Edge> get_edges(Vertex* v);
|
||||
list<Vertex*> get_neighbors(Vertex* v);
|
||||
|
||||
bool point_in_vertex(int x, int y, int size);
|
||||
bool point_in_vertex(int x, int y);
|
||||
Vertex * vertex_at(int x, int y);
|
||||
virtual bool add_vertex(int x, int y, int r, int colour = 0, int score = 0,
|
||||
Vertex* src=NULL);
|
||||
void remove_vertex(Vertex* target);
|
||||
|
||||
bool is_planar() const { return planar; }
|
||||
void set_planar(bool planar) { this->planar = planar; }
|
||||
|
Reference in New Issue
Block a user