implement new cards value function; circa factor 10 faster than old version

This commit is contained in:
floty
2014-05-24 15:13:49 +02:00
parent ac85136ac2
commit 0f59c0ad57
7 changed files with 231 additions and 62 deletions
+11 -4
View File
@@ -38,18 +38,25 @@
#include <iostream>
#include <vector>
struct KickerValue {
int factorValue;
int select;
int remain;
};
class CardsValue
{
public:
static int holeCardsClass(int, int);
static int cardsValue(int*, int*);
static int cardsValue(int[4], int[4]);
static KickerValue determineKickerValue(int, int, int);
static int cardsValueOld(int[7], int[5]);
static std::string determineHandName(int myCardsValueInt, PlayerList activePlayerList);
static std::list<std::string> translateCardsValueCode(int cardsValueCode);
static int holeCardsToIntCode(int*);
static int* intCodeToHoleCards(int);
static int holeCardsToIntCode(int[2]);
static std::vector< std::vector<int> > calcCardsChance(GameState, int*, int*);
static std::vector< std::vector<int> > calcCardsChance(GameState, int[2], int[5]);
//static int** showdown(GameState, int**, int);
};