Skip to content

Commit

Permalink
add log4cplus lib to program.
Browse files Browse the repository at this point in the history
  • Loading branch information
ShiboBrady committed Nov 28, 2015
1 parent 0021d14 commit 80b4a97
Show file tree
Hide file tree
Showing 14 changed files with 352 additions and 344 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*.[oa]
*.log
core
robot_client
robot_server
10 changes: 6 additions & 4 deletions robot_client/AIUtils.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <iostream>

#include <sstream>
#include "AIUtils.h"
#include "log.h"

using namespace std;

Expand Down Expand Up @@ -1749,14 +1750,16 @@ void AIUtils::handToPointsArray( Hand &hand, int points[CARD_POINT_NUM] )

void AIUtils::printPoints( int points[CARD_POINT_NUM], char endChar )
{
stringstream sstream;
for (int i = 0; i < CARD_POINT_NUM; ++i)
{
for (int j = 0; j < points[i]; ++j)
{
cout << POINT_CHAR[i];
sstream << POINT_CHAR[i];
}
}
cout << endChar;
sstream << endChar;
DEBUG("card info: %s", sstream.str().c_str());
}

void AIUtils::printHand( Hand &hand )
Expand Down Expand Up @@ -1784,7 +1787,6 @@ void AIUtils::printCardInfo( vector<int>& vecContent )
int points[CARD_POINT_NUM] = {0};
cardVecToPointArr(vecContent, points);
printPoints(points, ' ');
cout << endl;
}

int AIUtils::getHandCount( Hand &hand )
Expand Down
Loading

0 comments on commit 80b4a97

Please sign in to comment.