#include #include #include #include #include using namespace std; // Hold the number of players int nPlays = 0; int nPlayers = 0; string *sPlayers; int *nPlayerBank; bool nPlayerBets[2][36]; int result = 0; void ClearScreen() { cout << string( 100, '\n' ); } void reset() { // Init the bets for(int i=0;i> nBets; // Get the bets now for(int j=0;j> nBet; nPlayerBets[i][nBet] = true; } } // Print the bets for(int i=0;i0) { nPlayerBank[i] = nPlayerBank[i] - (nBets - 1); cout << sPlayers[i] << " has $" << nPlayerBank[i] << "!\n"; } else { nPlayerBank[i] = nPlayerBank[i] - (nBets); cout << sPlayers[i] << " has $" << nPlayerBank[i] << "!\n"; } } } cout << "\n\n***Please type \"n\" then hit enter to continue***"; while (1) { if ('n' == getchar()) break; } } int main() { // Welcome and get number of players cout << "Welcome to roulette!\n"; cout << "\nEnter number of players: "; cin >> nPlayers; // This will hold the player names sPlayers = new string[nPlayers]; nPlayerBank = new int[nPlayers]; reset(); // Get player names for(int i=0; i> sPlayers[i]; } // Welcome and get cash for(int i=0; i > getCash; nPlayerBank[i] = getCash; cout << "Thank you " << sPlayers[i] << " you have $" << nPlayerBank[i] << " chips!\n"; } for(;;) { getbets(); spin(); checktable(); reset(); } }