Basic hit detection
This commit is contained in:
@ -178,8 +178,8 @@ struct PokerTurn PokerPlayer::getAITurn() {
|
||||
amount = bluffBet;
|
||||
isBluff = true;
|
||||
}
|
||||
} else if ((expectedGain < 1.0f && confidence < 0.85f) || confidence < 0.1f) {
|
||||
if (random < 80) {
|
||||
} else if((expectedGain < 1.0f && confidence < 0.85f) || confidence < 0.1f) {
|
||||
if(random < 80) {
|
||||
amount = 0;
|
||||
} else if(random < 5) {
|
||||
amount = callBet;
|
||||
@ -188,13 +188,13 @@ struct PokerTurn PokerPlayer::getAITurn() {
|
||||
amount = bluffBet;
|
||||
isBluff = true;
|
||||
}
|
||||
} else if ((expectedGain < 1.3f && confidence < 0.9f) || confidence < 0.5f) {
|
||||
if (random < 60 || confidence < 0.5f) {
|
||||
} else if((expectedGain < 1.3f && confidence < 0.9f) || confidence < 0.5f) {
|
||||
if(random < 60 || confidence < 0.5f) {
|
||||
amount = callBet;
|
||||
} else {
|
||||
amount = maxBet;
|
||||
}
|
||||
} else if (confidence < 0.95f || this->pokerGame->community.size() < 4) {
|
||||
} else if(confidence < 0.95f || this->pokerGame->community.size() < 4) {
|
||||
if(random < 20) {
|
||||
amount = callBet;
|
||||
} else {
|
||||
|
@ -71,16 +71,16 @@ int32_t Dawn::ticTacToeGetBoardScore(
|
||||
uint8_t countEmpty = 0;
|
||||
|
||||
for (uint8_t j = 0; j < 3; j++) {
|
||||
if (board[lines[i][j]] == player) {
|
||||
if(board[lines[i][j]] == player) {
|
||||
countPlayer++;
|
||||
} else if (board[lines[i][j]] == TIC_TAC_TOE_EMPTY) {
|
||||
} else if(board[lines[i][j]] == TIC_TAC_TOE_EMPTY) {
|
||||
countEmpty++;
|
||||
}
|
||||
}
|
||||
|
||||
if (countPlayer == 2 && countEmpty == 1) {
|
||||
if(countPlayer == 2 && countEmpty == 1) {
|
||||
score += 10;
|
||||
} else if (countPlayer == 1 && countEmpty == 2) {
|
||||
} else if(countPlayer == 1 && countEmpty == 2) {
|
||||
score += 1;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user