the calling ranges are stored in a function like this where KK+ means pocket pairs KK and better
const char* prw_preflop_ICMrange[] = {
"AA+",
"KK+",
"KK+,AKs",
}
I would like to write a function that would remove the card combos of my own holding from opponents range e.g.:
I hold the "Ac8d" and opponents range is "KK+,AKs" then the function should loop through his calling range and remove 3 combos from AA and 1 combo from AKs. Likewise it should loop through all Ax and 8x hand possibilities and remove the combos that involve the Ac and 8d.
The function should return an integer with my opponents actual calling range e.g.:
(16 combos - 4 combos)/(1326 combos - 101 combos) = 0.0098
(his calling range of 0.0121 is actually more narrow due to card removal)
How could you achieve something like this?