Betting Calculator Pseudocode