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
|
#include "Poker.h"
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#define size 4
using namespace std;
char response[size];
string a;
string cardValues[14] = {"You'll never see me in the program!", "Ace", "2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King"};
int main(int argc, const char * argv[]) {
int communityCards[5] = {28, 5, 6, 8, 48};
int communityValues[5];
for (int i = 0; communityCards[i]!=0; i++) {
communityValues[i]=getValue(communityCards[i]);
}
string v = getSuit(25);
int z = getValue(25);
string u = getSuit(15);
int w = getValue(15);
bool x = checkPair(z, w, communityValues[0], communityValues[1], communityValues[2], communityValues[3], communityValues[4]);
string b = cardValues[w];
string a = cardValues[z];
cout << "Your card is the " << a << " of " << v << " and the " << b << " of " << u << "." << endl;
(x) ? cout << "You have a pair. " : cout << "You don't have a pair";
return 0;
}
|