Skip to content

Commit

Permalink
Set recommendations for winner/split/totalAdd values
Browse files Browse the repository at this point in the history
  • Loading branch information
Duzzuti committed May 20, 2024
1 parent e943b1b commit 7a8b22b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions tools/hand_strengths/hand_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class HandUtils {
/// @param totalAdd The amount to add to the total stat for each occurrence
/// @exception Guarantee No-throw
/// @note The totalAdd should be greater or equal than the maximum of winnerAdd and splitAdd to keep a meaningful total count
/// @note The winnerAdd, splitAdd and totalAdd should be in the range of 0 to 9 (has to be checked by the caller)
/// @note winnerAdd and splitAdd are used to balance the effects of winning and splitting
/// @note if splitAdd is 0, a split is treated as a loss, if winnerAdd is twice the value of splitAdd, a split is treated as a half win, etc.
HandUtils(const u_int8_t winnerAdd, const u_int8_t splitAdd, const u_int8_t totalAdd) noexcept : winnerAdd(winnerAdd), splitAdd(splitAdd), totalAdd(totalAdd) {
Expand Down
2 changes: 2 additions & 0 deletions tools/hand_strengths/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ int main(int argc, char** argv) {
std::cout << "Output file: " << argv[i + 1] << std::endl;
filename = argv[i + 1];
} else if (strcmp(argv[i], "--options") == 0) {
// TODO error handling
// TODO numbers should be between 0 and 9 only
winnerAdd = std::stoi(argv[i + 1]);
splitAdd = std::stoi(argv[i + 2]);
totalAdd = std::stoi(argv[i + 3]);
Expand Down

0 comments on commit 7a8b22b

Please sign in to comment.