#include "odds.h" // returns the probability of the Angels will win the next game (given that // the Angels have previously won "AWins" games and the Giants have previously // won "Gwins" games) double probabilityOfAngelVictory (int AWins, int GWins) { // very complex - based on likely starting pitchers, etc. const static double table [4][4] = { { 0.42, 0.51, 0.45, 0.42 }, { 0.37, 0.50, 0.43, 0.51 }, { 0.34, 0.53, 0.61, 0.42 }, { 0.39, 0.43, 0.61, 0.54 } }; return table[AWins][GWins]; }