Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <math.h>
- #include <vector>
- using namespace std;
- class Wheel {
- public:
- int getNumber() {
- return numResult;
- }
- string getColor() {
- return colorResult;
- }
- void setNumber(int N) {
- numResult = N;
- }
- void setColor(string C) {
- colorResult;
- }
- Wheel ();
- Wheel (int, string);
- private:
- int numResult;
- string colorResult;
- };
- Wheel::Wheel () {
- numResult = 0;
- colorResult = "green";
- }
- Wheel::Wheel (int N, string C) {
- numResult = N;
- colorResult = C;
- }
- class Bet {
- public:
- /*
- friend istream& operator>>(istream &input, Bet &b ) {
- input >> b.x;
- return input;
- }
- friend ostream& operator<<(ostream &output, const Bet &b ) {
- output << "$" << b.x;
- return output;
- }
- */
- int getP() {
- return price;
- }
- vector<int> getNums() {
- return nums;
- }
- int getType() {
- return betType;
- }
- string getTable() {
- return tableType;
- }
- int getSpecific() {
- return betSpecific;
- }
- void setB(int P) {
- price = P;
- }
- void setNums(vector<int> Ns) {
- nums = Ns;
- }
- void setType(int T) {
- betType = T;
- }
- void setTable(string Ta) {
- tableType = Ta;
- }
- void setSpecific(int S) {
- betSpecific = S;
- }
- Bet ();
- Bet (int, vector<int>, int, string, int);
- private:
- int price;
- vector<int> nums;
- int betType;
- string tableType;
- int betSpecific;
- };
- Bet::Bet () {
- price = 0;
- nums = {0};
- betType = 0;
- tableType = "American";
- betSpecific = 0;
- }
- Bet::Bet (int P, vector<int> Ns, int T, string Ta, int S) {
- price = P;
- nums = Ns;
- betType = T;
- tableType = Ta;
- betSpecific = S;
- }
- void tableChoice(Bet b1) {
- int choice;
- int cont = 0;
- do {
- cout << "What type of table do you want to play on today? \n 1. European \n 2. American" << endl;
- cin >> choice;
- if (choice == 1) {
- b1.setTable("European");
- cont = 1;
- } else if (choice == 2) {
- b1.setTable("American");
- cont = 1;
- } else {
- cout << "This is not an option. Please make another." << endl;
- cont = 0;
- }
- } while (cont = 0);
- }
- void betPayout(Bet b1) {
- int payout;
- int cont = 0;
- do {
- if (b1.getTable() == "American") {
- cout << "What type of bet do you want to make? \n 1. Straight Up (Any single number including 0, 00, and 1-36) \n\t Payout: 35 to 1" << endl;
- } else {
- cout << "What type of bet do you want to make? \n 1. Straight Up (Any single number including 0, and 1-36) \n\t Payout: 35 to 1" << endl;
- }
- cout << " 2. Row (Between 0 and 00, Only for American tables) \n\t Payout: 17 to 1 \n 3. Split (Bewteen any two numbers, vertical or horizontal) \n\t Payout: 17 to 1" << endl;
- cout << " 4. Street (One whole row of numbers, i.e. 1,2,3) \n\t Payout: 11 to 1" << endl;
- cout << " 5. Corner (Between four numbers, i.e. 1,2,4,5) \n\t Payout: 8 to 1" << endl;
- cout << " 6. Top Line or Basket (Includes 0, 00, 1, 2, and 3) \n\t Payout: 6 to 1" << endl;
- cout << " 7. Six Line (Between two rows of numbers, i.e. 1,2,3 and 4,5,6)\n\t Payout: 5 to 1" << endl;
- cout << " 8. 1st Column (1, 4, 7, ...., 34) \n\t Payout: 2 to 1 \n 9. 2nd Column (2, 5, 8, ...., 35) \n\t Payout: 2 to 1 \n 10. 3rd Column (3, 6, 9, ...., 36) \n\t Payout: 2 to 1" << endl;
- cout << " 11. 1st Dozen (1 through 12) \n\t Payout: 2 to 1 \n 12. 2nd Dozen (13 through 24) \n\t Payout: 2 to 1 \n 13. 3rd Dozen (25 through 36) \n\t Payout: 2 to 1" << endl;
- cout << " 14. Odd (1, 3, 5, ...., 35) \n\t Payout: 1 to 1 \n 15. Even (2, 4, 6, ...., 36) \n\t Payout: 1 to 1 \n 16. Red (1, 3, 5, 7, 9, 12, 14, 16, 18, 19, 21, 23, 25, 27, 30, 32, 34, 36) \n\t Payout: 1 to 1" << endl;
- cout << " 17. Black (2, 4, 6, 8, 10, 11, 13, 15, 17, 20, 22, 24, 26, 28, 29, 31, 33, 35) \n\t Payout: 1 to 1 \n 18. 1 to 18 \n\t Payout: 1 to 1 \n 19. 19 to 36 \n\t Payout: 1 to 1" << endl;
- cin >> payout;
- if (payout == 1) {
- b1.setType(1);
- b1.setSpecific(payout);
- cont = 1;
- } else if (payout == 2) {
- if (b1.getTable() == "American") {
- b1.setType(2);
- b1.setSpecific(payout);
- cont = 1;
- } else {
- cout << "The selection you made was not valid since you are playing on a European table. Please make another selection." << endl;
- cont = 0;
- }
- } else if (payout == 3) {
- b1.setType(3);
- b1.setSpecific(payout);
- cont = 1;
- } else if (payout == 4) {
- b1.setType(4);
- b1.setSpecific(payout);
- cont = 1;
- } else if (payout == 5) {
- b1.setType(5);
- b1.setSpecific(payout);
- cont = 1;
- } else if (payout == 6) {
- b1.setType(6);
- b1.setSpecific(payout);
- cont = 1;
- } else if (payout == 7) {
- b1.setType(7);
- b1.setSpecific(payout);
- cont = 1;
- } else if ((payout == 8) || (payout == 9) || (payout == 10) || (payout == 11) || (payout == 12) || (payout == 13)) {
- b1.setType(8);
- b1.setSpecific(payout);
- cont = 1;
- } else if ((payout == 14) || (payout == 15) || (payout == 16) || (payout == 17) || (payout == 18) || (payout == 19)) {
- b1.setType(9);
- b1.setSpecific(payout);
- cont = 1;
- } else {
- cout << "The selection you made was not valid. Please make another selection." << endl;
- cont = 0;
- }
- } while (cont == 0);
- }
- void getNumbersAndPrice(Bet b1) {
- vector<int> numbers;
- int amount;
- int currentNum;
- int currentNum2;
- int currentNum3;
- int currentNum4;
- string colorChoice;
- int cont;
- if (b1.getSpecific() == 1) {
- cout << "Chose the number you want to bet on.";
- cin >> currentNum;
- numbers.push_back(currentNum);
- } else if (b1.getSpecific() == 2) {
- numbers = {0, 00};
- } else if (b1.getSpecific() == 3) {
- cout << "Chose the first number you want to bet on.";
- cin >> currentNum;
- numbers.push_back(currentNum);
- cont = 0;
- do {
- cout << "Now chose the second number you want to bet on. Remember, it has to be either horizontally connected or vertically connected to your first number.";
- cin >> currentNum2;
- if ((currentNum2 == currentNum + 1) || (currentNum2 == currentNum + 3) || (currentNum2 == currentNum - 1) || (currentNum2 == currentNum - 3)) {
- numbers.push_back(currentNum2);
- }
- } while (cont = 0);
- } else if (b1.getSpecific() == 4) {
- cout << "Which row would you like to bet on? (1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34)";
- cin >> currentNum;
- cont = 0;
- do {
- if ((currentNum == 1) || (currentNum == 4) || (currentNum == 7) || (currentNum == 10) || (currentNum == 13) || (currentNum == 16) || (currentNum == 19) || (currentNum == 22) || (currentNum == 25) || (currentNum == 28) || (currentNum == 31) || (currentNum == 34)) {
- numbers.push_back(currentNum);
- numbers.push_back(currentNum + 1);
- numbers.push_back(currentNum + 2);
- cont = 1;
- } else {
- cout << "The number you selected is not the start of a row. Please make another selection.";
- }
- } while (cont == 0);
- } else if (b1.getSpecific() == 5) {
- cont = 0;
- do {
- cout << "Select the four numbers that are going to be part of your bet. Remember that these numbers all have to share a corner.";
- cin >> currentNum;
- cin >> currentNum2;
- cin >> currentNum3;
- cin >> currentNum4;
- } while (cont = 0);
- } else if (b1.getSpecific() == 6) {
- numbers = {0, 00, 1, 2, 3}
- } else if (b1.getSpecific() == 7) {
- cont = 0;
- do {
- cout << "Chose two rows you want to place your bet between. (1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34)";
- cin >> currentNum;
- cin >> currentNum2;
- } while (cont = 0);
- } else if (b1.getSpecific() == 8) {
- numbers = {1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34};
- } else if (b1.getSpecific() == 9) {
- numbers = {2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35};
- } else if (b1.getSpecific() == 10) {
- numbers = {3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36};
- } else if (b1.getSpecific() == 11) {
- numbers = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
- } else if (b1.getSpecific() == 12) {
- numbers = {13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24};
- } else if (b1.getSpecific() == 13) {
- numbers = {25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36};
- } else if (b1.getSpecific() == 14) {
- numbers = {1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35};
- } else if (b1.getSpecific() == 15) {
- numbers = {2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36};
- } else if (b1.getSpecific() == 16) {
- numbers = {1, 3, 5, 7, 9, 12, 14, 16, 18, 19, 21, 23, 25, 27, 30, 32, 34, 36};
- } else if (b1.getSpecific() == 17) {
- numbers = {2, 4, 6, 8, 10, 11, 13, 15, 17, 20, 22, 24, 26, 28, 29, 31, 33, 35};
- } else if (b1.getSpecific() == 18) {
- numbers = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18};
- } else {
- numbers = {19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36};
- }
- }
- bool continueOrnot(string answer) {
- if(answer == "Y") {
- cout<<"ggg";
- //flavortext
- }
- else if(answer == "y") {
- cout<<"ggg";
- //flavortext
- }
- else if(answer == "Yes") {
- cout<<"ggg";
- //flavortext
- }
- else if(answer == "yes") {
- cout<<"ggg";
- //flavortext
- }
- else if(answer == "N") {
- cout<<"ggg";
- //flavortext
- }
- else if(answer == "n") {
- cout<<"ggg";
- //flavortext
- }
- else if(answer == "No") {
- cout<<"ggg";
- //flavortext
- }
- else if(answer == "no") {
- cout<<"ggg";
- //flavortext
- } else {
- cout<<"Sorry I didnt quite catch that, how about you try again";
- }
- }
- int main() {
- /*
- double startingMoney;
- double finalMoney;
- string ans;
- int numBet;
- Bet B1;
- Bet B2;
- Bet B3;
- Bet B4;
- Bet B5;
- cout<< "How much money you got today kid?"<< endl;
- cin >> startingMoney;
- finalMoney = startingMoney;
- while(finalMoney>= 0) {
- cout<< "How many times do you want to bet this round?"<< endl;
- cin>> numBet;
- numBet = numBet - 1;
- switch(numBet) {
- case 0:
- cout<< "Place your bet kid"<< endl;
- cin>>B1;
- cout<< "one bet"<<endl;
- break;
- case 1:
- cout<< "Place your first bet kid"<<endl;
- cin>>B1;
- cout<< "And now your secone one"<< endl;
- cin>>B2;
- cout<< "two bets"<<endl;
- break;
- case 2:
- cout<< "Place your first bet kid"<<endl;
- cin>>B1;
- cout<< "And now your secone one"<< endl;
- cin>>B2;
- cout<<"Place your third one kid I dont have all day"<<endl;
- cin>>B3;
- cout<< "three bets"<<endl;
- break;
- case 3:
- cout<< "Place your first bet kid"<<endl;
- cin>>B1;
- cout<< "And now your secone one"<< endl;
- cin>>B2;
- cout<<"Place your third one kid I dont have all day"<<endl;
- cin>>B3;
- cout<< "Come on kid give me your fourth one already"<< endl;
- cin>>B4;
- cout<< "four bets"<<endl;
- break;
- case 4:
- cout<< "Place your first bet kid"<<endl;
- cin>>B1;
- cout<< "And now your secone one"<< endl;
- cin>>B2;
- cout<<"Place your third one kid I dont have all day"<<endl;
- cin>>B3;
- cout<< "Come on kid give me your fourth one already"<< endl;
- cin>>B4;
- cout<< "And finally your fifth one?"<< endl;
- cin>>B5;
- cout<< "five bets"<<endl;
- break;
- default:
- cin>>B1;
- cout<< "Too slow bud you only have time for one bet this round"<< endl;
- }
- }
- cout<< "Guess youre done for now, see you again later."<< endl<< "Or would you like to have, how should I put this? An interesting little journey?"<< endl;
- cin>> ans;
- if(continueOrnot(ans)) {
- //another function call for the mob boss idea
- } else {
- cout<<"Well then, you better get out of here before you have one."<< endl;
- }
- */
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement