Cleaned up some debugging code
This commit is contained in:
12
gamedata.cpp
12
gamedata.cpp
@ -93,8 +93,8 @@ bool GameData::add_vertex(int x, int y, int r, int colour)
|
||||
{
|
||||
Graph::add_vertex(x, y, r, colour, 10);
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "debug: GameData::add_vertex(): strength=%2.f\n",
|
||||
calculate_strength(*(vertices.rbegin())));
|
||||
fprintf(stderr, "debug: GameData::add_vertex(): strength=%2.f\n",
|
||||
calculate_strength(*(vertices.rbegin())));
|
||||
#endif
|
||||
if (player == PLAYER1) player1_played = true;
|
||||
if (player == PLAYER2) player2_played = true;
|
||||
@ -225,17 +225,13 @@ bool GameData::endgame()
|
||||
if (get_colour(PLAYER1_COLOUR).empty())
|
||||
{
|
||||
player = WIN2;
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "debug: Gamedata::endgame(): player 2 wins\n");
|
||||
#endif
|
||||
debug("Gamedata::endgame(): player 2 wins\n");
|
||||
return true;
|
||||
}
|
||||
if (get_colour(PLAYER2_COLOUR).empty())
|
||||
{
|
||||
player = WIN1;
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "debug: Gamedata::endgame(): player 1 wins\n");
|
||||
#endif
|
||||
debug("Gamedata::endgame(): player 1 wins\n");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user