bkushigian / postflop-solver

An open-source postflop solver library written in Rust
GNU Affero General Public License v3.0
5 stars 0 forks source link

Improve names for functions and state variables #3

Open JacobVanGeffen opened 1 month ago

JacobVanGeffen commented 1 month ago

Inappropriately named functions/variables should be changed to follow these rules:

For example, check_card_config should be renamed to reflect the fact that it updates state through init_hands.

Additionally, there is currently a convention of state variables having either no postfix to mean "applies to out-of-position" and postfix _ip to mean "applies to in-position". Variables representing out-of-position traits should be postfixed with _oop to make this distinction clear.

bkushigian commented 1 month ago

Agreed!

I think that some of the _ip postfix vs no postfix isn't quite so straightforward. For instance PostFlopNode::num_elements is always the number of 'elements' the current player has, while PostFlopNode::num_elements_ip is the number of elements IP has, but only on the first node of a street.

It would be good to:

  1. figure out exactly why this is needed
  2. rename accordingly
  3. document :)
bkushigian commented 1 month ago

We should put this into the docs branch as that is where I'm keeping track of all new documentation and clarity renaming changes.

bkushigian commented 1 month ago

Now part of PR #4