Skip to content

Commit

Permalink
Converted tabs to spaces.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenhow committed Jun 17, 2012
1 parent 08160bc commit bed58cb
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
14 changes: 7 additions & 7 deletions baccarat7up.cpp
@@ -1,14 +1,14 @@
#include "baccarat7up.h"

Hand::Hand() : vector<int>() {
Hand::Hand() : vector<int>() {
}

int Hand::getTotal() {
int total=0;
for (vector<int>::iterator iter=this->begin(); iter!=this->end(); iter++) {
total += *iter;
}
return (total%10);
return (total%10);
}

bool Hand::isNatural() {
Expand Down Expand Up @@ -121,11 +121,11 @@ CSM::CSM(int minDepth) {

int CSM::deal() {
int card, pos;
while (buffer.size() < 1+minBufferDepth) {
pos = reservoir.size()*random.genrand64_real2();
buffer.insert(buffer.end(), reservoir[pos]);
reservoir.erase(reservoir.begin()+pos);
}
while (buffer.size() < 1+minBufferDepth) {
pos = reservoir.size()*random.genrand64_real2();
buffer.insert(buffer.end(), reservoir[pos]);
reservoir.erase(reservoir.begin()+pos);
}
card = buffer[0];
buffer.erase(buffer.begin());
return card;
Expand Down
32 changes: 16 additions & 16 deletions baccarat7up.h
Expand Up @@ -10,39 +10,39 @@ using namespace std;

class Hand : public vector<int> {
public:
Hand();
int getTotal();
bool isNatural();
Hand();
int getTotal();
bool isNatural();
};

class CSM {
protected:
Mersenne64 random;
vector<int> buffer;
Mersenne64 random;
vector<int> buffer;
int minBufferDepth;
vector<int> reservoir;
public:
CSM(int);
virtual int deal();
virtual void muck(int);
CSM(int);
virtual int deal();
virtual void muck(int);
};

class ShuffleMaster126 : public CSM {
protected:
vector<int> slots[NUM_SLOTS];
vector<int> slots[NUM_SLOTS];
void dropSlot();
int maxCardsPerSlot;
int maxCardsPerSlot;
public:
ShuffleMaster126(int minDepth, int maxDepth);
virtual int deal();
virtual void muck(int);
ShuffleMaster126(int minDepth, int maxDepth);
virtual int deal();
virtual void muck(int);
};

class Rules7Up {
public:
static void deal(Hand &player, Hand &banker, CSM &shoe);
static double bankerOutcome(Hand &player, Hand &banker);
static double playerOutcome(Hand &player, Hand &banker);
static void deal(Hand &player, Hand &banker, CSM &shoe);
static double bankerOutcome(Hand &player, Hand &banker);
static double playerOutcome(Hand &player, Hand &banker);
static double super7s(Hand &player, Hand &banker);
};

Expand Down

0 comments on commit bed58cb

Please sign in to comment.