1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
private void calcSinglePush(int myIndex, int oppIndex, double[,] playerData, double[] ICMs, int ICMc)
{
// the amount collected from players treble and blinds
double betSum = 0;
// treated stacks a temporary table
double[] stacks = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
// EV win
for (int i = 0; i < 10; i++)
{
stacks[i] = playerData[i, STACK] - playerData[i, BETS];
betSum += playerData[i, BETS];
}
calcStackBeforePush(myIndex, oppIndex, stacks, playerData, ref betSum);
double[,] stacksWin = { { 2, stacks[myIndex], 0 }, { 1, stacks[oppIndex], 0 } };
calcStacks(stacksWin, betSum);
stacks[myIndex] = stacksWin[0, 2];
stacks[oppIndex] = stacksWin[1, 2];
double[] ICMwinArray = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
calcICM(stacks, ICMwinArray, 10, ICMs, ICMc);
playerData[oppIndex, EVWIN] = ICMwinArray[myIndex];
// EV lose
betSum = 0;
for (int i = 0; i < 10; i++)
{
stacks[i] = playerData[i, STACK] - playerData[i, BETS];
betSum += playerData[i, BETS];
}
calcStackBeforePush(myIndex, oppIndex, stacks, playerData, ref betSum);
double[,] stacksLose = { { 1, stacks[myIndex], 0 }, { 2, stacks[oppIndex], 0 } };
calcStacks(stacksLose, betSum);
stacks[myIndex] = stacksLose[0, 2];
stacks[oppIndex] = stacksLose[1, 2];
double[] ICMloseArray = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
calcICM(stacks, ICMloseArray, 10, ICMs, ICMc);
playerData[oppIndex, EVLOSE] = ICMloseArray[myIndex];
}
|