vector in cardsChance
This commit is contained in:
@@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
#include "arraydata.h"
|
#include "arraydata.h"
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
struct RoundData
|
struct RoundData
|
||||||
{
|
{
|
||||||
@@ -1055,11 +1056,9 @@ vector< vector<int> > ArrayData::getHandChancePreflop(int handCode) {
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
vector< vector<int> > chance(2);
|
vector< vector<int> > chance(2);
|
||||||
vector<int> chance_0(10);
|
|
||||||
vector<int> chance_1(10);
|
|
||||||
|
|
||||||
chance[0] = chance_0;
|
chance[0].resize(10);
|
||||||
chance[1] = chance_1;
|
chance[1].resize(10);
|
||||||
|
|
||||||
for(i=0;i<10;i++) {
|
for(i=0;i<10;i++) {
|
||||||
chance[0][i] = 0;
|
chance[0][i] = 0;
|
||||||
|
|||||||
@@ -22,11 +22,8 @@
|
|||||||
|
|
||||||
#include <core/loghelper.h>
|
#include <core/loghelper.h>
|
||||||
|
|
||||||
#include<iostream>
|
|
||||||
#include<vector>
|
#include<vector>
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
class ArrayData{
|
class ArrayData{
|
||||||
public:
|
public:
|
||||||
ArrayData();
|
ArrayData();
|
||||||
@@ -34,7 +31,7 @@ public:
|
|||||||
~ArrayData();
|
~ArrayData();
|
||||||
|
|
||||||
void getHandChancePreflop(int, int**);
|
void getHandChancePreflop(int, int**);
|
||||||
vector< vector<int> > getHandChancePreflop(int);
|
std::vector< std::vector<int> > getHandChancePreflop(int);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
#include "cardsvalue.h"
|
#include "cardsvalue.h"
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
CardsValue::CardsValue()
|
CardsValue::CardsValue()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -568,11 +570,9 @@ vector< vector<int> > CardsValue::calcCardsChance(GameState beRoID, int* playerC
|
|||||||
int i,j;
|
int i,j;
|
||||||
|
|
||||||
vector< vector<int> > chance(2);
|
vector< vector<int> > chance(2);
|
||||||
vector<int> chance_0(10);
|
|
||||||
vector<int> chance_1(10);
|
|
||||||
|
|
||||||
chance[0] = chance_0;
|
chance[0].resize(10);
|
||||||
chance[1] = chance_1;
|
chance[1].resize(10);
|
||||||
|
|
||||||
for(i=0;i<10;i++) {
|
for(i=0;i<10;i++) {
|
||||||
chance[0][i] = 0;
|
chance[0][i] = 0;
|
||||||
|
|||||||
@@ -24,10 +24,9 @@
|
|||||||
#include "arraydata.h"
|
#include "arraydata.h"
|
||||||
#include "tools.h"
|
#include "tools.h"
|
||||||
|
|
||||||
#include<iostream>
|
|
||||||
#include<vector>
|
#include<vector>
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
class CardsValue{
|
class CardsValue{
|
||||||
public:
|
public:
|
||||||
@@ -41,7 +40,7 @@ public:
|
|||||||
int holeCardsToIntCode(int*);
|
int holeCardsToIntCode(int*);
|
||||||
int* intCodeToHoleCards(int);
|
int* intCodeToHoleCards(int);
|
||||||
|
|
||||||
vector< vector<int> > calcCardsChance(GameState, int*, int*);
|
std::vector< std::vector<int> > calcCardsChance(GameState, int*, int*);
|
||||||
int** showdown(GameState, int**, int);
|
int** showdown(GameState, int**, int);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user