Support different colours for different vertices
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user