Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //ACSL
- //Olivia Pagach
- //12-11-17
- //stuff
- #include <iostream>
- #include <time.h>
- #include <stdlib.h>
- #include <iomanip>
- #include <fstream>
- using namespace std;
- //main thing
- int main ()
- {
- cout<<"Welcome to an overly complicated card game program..by Olivia Pagach. Sit back and relax, there is no user input! :D"<<endl;
- int i=0;
- int start=0;
- int total=0;
- char comma = ',';
- cout<<"ok"<<endl;
- ifstream infile;
- char cNum [11];
- int player1 [7];
- int player2 [4];
- int dealer [3];
- cout<<"ok"<<endl;
- ofstream outFile;
- cout<<"ok"<<endl;
- cout<<start<<endl;
- infile.open ("cardslol.txt", ifstream::in);
- if (infile.is_open())
- {
- while (infile.good())
- {
- infile.getline(cNum, 256, ',');
- if (i==0)
- {
- cout<<start;
- cout<<"b4startok"<<endl;
- start = atoi(cNum);
- cout<<"afterstartok"<<endl;
- cout<<start;
- else {
- cout<<cards;
- cout<<"b4cardsok"<<endl;
- cards [i] =atoi(cNum);
- cout<<"aftercardsok"<<endl;
- cout<<cards;
- }
- }
- i++;
- return 0;
- }
- int game (int start, int cards [])
- {
- int total=start; //total will begin at 87
- for (i=1; i<=11; i++)
- int total=total+cards[i]; //92=87+[1](5)
- //total=92+[
- if (total>99)
- {
- cout<<"After 4 rounds, the score is"<<total<<"the game is over.."<<endl;
- if (i==[1,2,3,4,6,8,10])
- {
- cout<<"The dealer is the winner"<<endl;
- else {
- cout<<"The player is the winner"<<endl;
- }
- }
- }
- i++;
- }
- }
- }
- int game (int start, int cards [])
- {
- do {
- total=total=cards[1];
- total=total=cards[5];
- } while(total<99);
- }
- if(total>=99)
- {
- cout<<"The game is over, the ending score is..."<<total<<"The winner is..."<<endl;
- if (i==[1 || 2 || 3 || 4 ||])
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement