|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// step 7.c. ask the player to play |
|
|
// step 7.c. ask the player to play |
|
|
|
|
|
player->playerValue = playerTotal; |
|
|
|
|
|
player->dealerValue = dealerTotal; |
|
|
player->actionRequired = Libreblackjack::PlayerActionRequired::Play; |
|
|
player->actionRequired = Libreblackjack::PlayerActionRequired::Play; |
|
|
nextAction = Libreblackjack::DealerAction::AskForPlay; |
|
|
nextAction = Libreblackjack::DealerAction::AskForPlay; |
|
|
return; |
|
|
return; |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
nextAction = Libreblackjack::DealerAction::AskForPlay; |
|
|
nextAction = Libreblackjack::DealerAction::AskForPlay; |
|
|
|
|
|
player->playerValue = playerTotal; |
|
|
|
|
|
player->dealerValue = dealerTotal; |
|
|
player->actionRequired = Libreblackjack::PlayerActionRequired::Play; |
|
|
player->actionRequired = Libreblackjack::PlayerActionRequired::Play; |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
break; |
|
|
break; |
|
|
|
|
|
|
|
|
case Libreblackjack::DealerAction::AskForPlay: |
|
|
case Libreblackjack::DealerAction::AskForPlay: |
|
|
|
|
|
player->playerValue = playerTotal; |
|
|
|
|
|
player->dealerValue = dealerTotal; |
|
|
player->actionRequired = Libreblackjack::PlayerActionRequired::Play; |
|
|
player->actionRequired = Libreblackjack::PlayerActionRequired::Play; |
|
|
nextAction = Libreblackjack::DealerAction::AskForPlay; |
|
|
nextAction = Libreblackjack::DealerAction::AskForPlay; |
|
|
return; |
|
|
return; |
|
|
|
|
|
|
|
|
nextAction = Libreblackjack::DealerAction::MoveOnToNextHand; |
|
|
nextAction = Libreblackjack::DealerAction::MoveOnToNextHand; |
|
|
return; |
|
|
return; |
|
|
} else { |
|
|
} else { |
|
|
|
|
|
player->playerValue = playerTotal; |
|
|
|
|
|
player->dealerValue = dealerTotal; |
|
|
player->actionRequired = Libreblackjack::PlayerActionRequired::Play; |
|
|
player->actionRequired = Libreblackjack::PlayerActionRequired::Play; |
|
|
nextAction = Libreblackjack::DealerAction::AskForPlay; |
|
|
nextAction = Libreblackjack::DealerAction::AskForPlay; |
|
|
return; |
|
|
return; |
|
|
|
|
|
|
|
|
nextAction = Libreblackjack::DealerAction::MoveOnToNextHand; |
|
|
nextAction = Libreblackjack::DealerAction::MoveOnToNextHand; |
|
|
return 1; |
|
|
return 1; |
|
|
} else { |
|
|
} else { |
|
|
|
|
|
// player->playerValue = playerTotal; |
|
|
|
|
|
// player->dealerValue = dealerTotal; |
|
|
player->actionRequired = Libreblackjack::PlayerActionRequired::Play; |
|
|
player->actionRequired = Libreblackjack::PlayerActionRequired::Play; |
|
|
nextAction = Libreblackjack::DealerAction::AskForPlay; |
|
|
nextAction = Libreblackjack::DealerAction::AskForPlay; |
|
|
return 1; |
|
|
return 1; |
|
|
|
|
|
|
|
|
return 1; |
|
|
return 1; |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
|
|
|
// player->playerValue = playerTotal; |
|
|
|
|
|
// player->dealerValue = dealerTotal; |
|
|
|
|
|
|
|
|
player->actionRequired = Libreblackjack::PlayerActionRequired::Play; |
|
|
player->actionRequired = Libreblackjack::PlayerActionRequired::Play; |
|
|
nextAction = Libreblackjack::DealerAction::AskForPlay; |
|
|
nextAction = Libreblackjack::DealerAction::AskForPlay; |
|
|
return 1; |
|
|
return 1; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
|
|
|
|
|
|
|
|
|
// player->playerValue = playerTotal; |
|
|
|
|
|
// player->dealerValue = dealerTotal; |
|
|
player->actionRequired = Libreblackjack::PlayerActionRequired::Play; |
|
|
player->actionRequired = Libreblackjack::PlayerActionRequired::Play; |
|
|
nextAction = Libreblackjack::DealerAction::AskForPlay; |
|
|
nextAction = Libreblackjack::DealerAction::AskForPlay; |
|
|
return 1; |
|
|
return 1; |