Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- HEADER:
- #define SUITS_H
- #include <string>
- #include <iostream>
- int rank [12] ; //declaration of array that holds value of card
- char suit [4] = (S,H,D,C) ; //declaration of array that holds type of card
- int isroyalflush(char suit[4], int rank[5]) //procedure that tests
- {
- if(suit[0] != suit[1]) return 0; //the hand is a flush if the suit does not contain
- if(suit[0] != suit[2]) return 0; // ..any other type of suit (I'm not sure if this is correct)
- if(suit[0] != suit[3]) return 0; //
- if(rank[0] = 13) return 0;
- if(rank[1] = 12) return 0;
- if(rank[2] = 11) return 0;
- if(rank[3] = 10) return 0;
- if(rank[4] = 1) return 0;
- return 1;
- };
- int isstraightflush //check for ordering in same suit
- int fourofakind //check for same rank, of each suit
- int fullhouse //check for three of same rank, irregardless of suit
- int flush //check that all five cards are the same suit
- int straight //check that rank is ordered, suit doesn't matter
- int threeofakind //check for three cards with same rank
- int twopair //check for pairs, check for consistencies in the pairs, suit doesn't matter
- int onepair //check for two cards in hand with equal rank
- int highcard //use if else, if none of above work, this is the option
- MAIN:
- #include "suits.h"
- #include <string>
- #include <iostream>
- using namespace std;
- int main()
- {
- };
- ERRORS:
- proj1/suits.h:6:18: error: 'S' was not declared in this scope
- proj1/suits.h:6:20: error: 'H' was not declared in this scope
- proj1/suits.h:6:22: error: 'D' was not declared in this scope
- proj1/suits.h:6:24: error: 'C' was not declared in this scope
Advertisement
Add Comment
Please, Sign In to add comment