Separated game-specific graph behavior into a subclass, implemented 2 players alternating turns

This commit is contained in:
2011-06-23 17:28:49 -04:00
parent b967542157
commit 5ed05fc829
7 changed files with 170 additions and 81 deletions

View File

@ -11,9 +11,7 @@
#include <SDL/SDL.h>
#include "mainevent.h"
#include "graph.h"
enum turn {PLAYER1, PLAYER2, WIN1, WIN2};
#include "gamedata.h"
class GameCore : public MainEvent
{
@ -42,13 +40,10 @@ class GameCore : public MainEvent
SDL_Surface* background;
// data
Graph graph;
turn who;
GameData data;
static int NODE_RADIUS;
static int MAX_MOVE_DISTANCE;
static int PLAYER1_COLOUR;
static int PLAYER2_COLOUR;
};