sqlite-log: implementing action logging

This commit is contained in:
floty
2011-02-27 00:03:39 +00:00
parent 63b28d7167
commit 1f833d106a
7 changed files with 212 additions and 58 deletions
+9
View File
@@ -486,26 +486,35 @@ void LocalHand::setBlinds()
// All in ?
if((*it_c)->getMyCash() <= smallBlind) {
myLog->logPlayerAction(0,smallBlindPosition+1,LOG_ACTION_SMALL_BLIND,(*it_c)->getMyCash());
(*it_c)->setMySet((*it_c)->getMyCash());
// 1 to do not log this
(*it_c)->setMyAction(PLAYER_ACTION_ALLIN,1);
} else {
myLog->logPlayerAction(0,smallBlindPosition+1,LOG_ACTION_SMALL_BLIND,smallBlind);
(*it_c)->setMySet(smallBlind);
}
}
}
//do sets --> TODO switch?
for (it_c=runningPlayerList->begin(); it_c!=runningPlayerList->end(); ++it_c) {
//big blind
if((*it_c)->getMyButton() == BUTTON_BIG_BLIND) {
// all in ?
if((*it_c)->getMyCash() <= 2*smallBlind) {
myLog->logPlayerAction(0,bigBlindPosition+1,LOG_ACTION_BIG_BLIND,(*it_c)->getMyCash());
(*it_c)->setMySet((*it_c)->getMyCash());
// 1 to do not log this
(*it_c)->setMyAction(PLAYER_ACTION_ALLIN,1);
} else {
myLog->logPlayerAction(0,bigBlindPosition+1,LOG_ACTION_BIG_BLIND,2*smallBlind);
(*it_c)->setMySet(2*smallBlind);
}
}