Support different colours for different vertices

This commit is contained in:
2011-06-23 15:10:40 -04:00
parent 9d36120f6d
commit b967542157
4 changed files with 43 additions and 16 deletions

View File

@ -13,6 +13,8 @@
#include "mainevent.h"
#include "graph.h"
enum turn {PLAYER1, PLAYER2, WIN1, WIN2};
class GameCore : public MainEvent
{
public:
@ -23,6 +25,7 @@ class GameCore : public MainEvent
// event handlers
void on_exit();
void on_lbutton_down(int x, int y);
void on_rbutton_down(int mX, int mY);
private:
bool init();
@ -40,9 +43,13 @@ class GameCore : public MainEvent
// data
Graph graph;
turn who;
static int NODE_RADIUS;
static int MAX_MOVE_DISTANCE;
static int PLAYER1_COLOUR;
static int PLAYER2_COLOUR;
};
#endif