Forgot to test compilation, made it happen...
This commit is contained in:
parent
3a3132e44a
commit
5205b9dfab
|
@ -57,7 +57,7 @@ bool GameData::add_vertex(int x, int y, int r, int colour)
|
||||||
if ((player == PLAYER1 && !player1_played) ||
|
if ((player == PLAYER1 && !player1_played) ||
|
||||||
(player == PLAYER2 && !player2_played))
|
(player == PLAYER2 && !player2_played))
|
||||||
{
|
{
|
||||||
Graph::add_vertex(x, y, r, colour);
|
Graph::add_vertex(x, y, r, colour, 10);
|
||||||
if (player == PLAYER1) player1_played = true;
|
if (player == PLAYER1) player1_played = true;
|
||||||
if (player == PLAYER2) player2_played = true;
|
if (player == PLAYER2) player2_played = true;
|
||||||
toggle_turn();
|
toggle_turn();
|
||||||
|
@ -66,7 +66,7 @@ bool GameData::add_vertex(int x, int y, int r, int colour)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Graph::add_vertex(x, y, r, colour, current))
|
if (Graph::add_vertex(x, y, r, colour, 10, current))
|
||||||
{
|
{
|
||||||
clear_current_vertex();
|
clear_current_vertex();
|
||||||
toggle_turn();
|
toggle_turn();
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
enum Turn {PLAYER1, PLAYER2, WIN1, WIN2};
|
enum Turn {PLAYER1, PLAYER2, WIN1, WIN2};
|
||||||
|
|
||||||
|
|
||||||
class GameData : public Graph
|
class GameData : public Graph
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -113,10 +113,11 @@ bool Graph::add_vertex(int x, int y, int r, int colour, int score, Vertex* src)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Vertex::Vertex(int x, int y, int r, int colour)
|
Vertex::Vertex(int x, int y, int r, int colour, int score)
|
||||||
{
|
{
|
||||||
this->x = x;
|
this->x = x;
|
||||||
this->y = y;
|
this->y = y;
|
||||||
this->r = r;
|
this->r = r;
|
||||||
this->colour = colour;
|
this->colour = colour;
|
||||||
|
this->score = score;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user