Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <stdlib.h>
- #include <windows.h>
- #include <conio.h>
- using namespace std;
- void v1(void)
- {
- cout<< " +----------------------------+" << endl;
- }
- int main()
- {
- int score = 0;
- int l = 0;
- int turns = 0;
- int wantedturns = 10;
- int r = 1;
- string color;
- cout<< "You're about to play 'Rock Paper Scissors' for your data" << endl;
- cout<< "--------------------------------------------------------" << endl;
- cout<< "You need to win at least ";
- cout<< "5";
- cout<< " rounds to save your data" << endl;
- cout<< "--------------------------------------------------------" << endl;
- cout<< "Dont be sad, At least you get to pick a color:" << endl;
- cout<< "Syntax: bgcolor next to textcolor 'no space'" << endl;
- cout<< "example: 0a is black background with light green text" << endl;
- cout<< "Colors:" << endl;
- cout<< "0 = Black" << endl;
- cout<< "1 = Blue" << endl;
- cout<< "2 = Green" << endl;
- cout<< "3 = Aqua" << endl;
- cout<< "4 = Red" << endl;
- cout<< "5 = Purple" << endl;
- cout<< "6 = Yellow" << endl;
- cout<< "7 = White" << endl;
- cout<< "8 = Gray" << endl;
- cout<< "9 = Light Blue" << endl;
- cout<< "a = Light Green" << endl;
- cout<< "b = Light Auqua" << endl;
- cout<< "c = Light Red" << endl;
- cout<< "d = Light Purple" << endl;
- cout<< "e = Light Yellow" << endl;
- cout<< "f = Bright White" << endl;
- cout<< "Color: ";
- cin>> color;
- string c2 = "color ";
- c2 += color;
- system(c2.c_str());
- system("cls");
- while (turns != wantedturns)
- {
- turns++;
- string wep;
- string ch;
- cout<< "---------+-----------------------------------+" << endl;
- cout<< "Round: ";
- cout<< r << " |" << " Current score: You-" << score << " | Computer-" << l << " |" << endl;
- cout<< "---------+-----------------------------------+" << endl;
- cout<< endl << "Enter your choice: 'Rock', 'Paper', 'Scissors':";
- cin>> wep;
- system("cls");
- string rock = "rock";
- string paper = "paper";
- string scissors = "scissors";
- int random = rand() % 3 + 1;
- if (random == 1)
- {
- ch = "rock";
- }
- if (random == 2)
- {
- ch = "paper";
- }
- if (random == 3)
- {
- ch = "scissors";
- }
- if (wep != ch && wep == paper && ch == scissors)
- {
- l++;
- cout<<"Computer wins | You: '" << wep << "'" << " | Computer: '" << ch <<"'";
- }
- if (wep != ch && wep == rock && ch == paper)
- {
- l++;
- cout<<"Computer wins | You: '" << wep << "'" << " | Computer: '" << ch <<"'";
- }
- if (wep != ch && wep == scissors && ch == rock)
- {
- l++;
- cout<<"Computer wins | You: '" << wep << "'" << " | Computer: '" << ch <<"'";
- }
- if (wep != ch && wep == paper && ch == rock)
- {
- cout<<"You win | You: '" << wep << "'" << " | Computer: '" << ch <<"' |";
- score++;
- }
- if (wep != ch && wep == rock && ch == scissors)
- {
- cout<<"You win | You: '" << wep << "'" << " | Computer: '" << ch <<"'";
- score++;
- }
- if (wep != ch && wep == scissors && ch == paper)
- {
- cout<<"You win | You: '" << wep << "'" << " | Computer: '" << ch <<"'";
- score++;
- }
- if (wep == ch)
- {
- cout<<"It's a tie | You: '" << wep << "'" << "| Computer: '" << ch <<"'";
- }
- r++;
- Sleep(3000);
- system("cls");
- }
- int fscore = wantedturns / 2;
- v1();
- cout<< " | S |" << endl;
- v1();
- Sleep(200);
- system("cls");
- v1();
- cout<< " | Sc |"<< endl;
- v1();
- Sleep(200);
- system("cls");
- v1();
- cout<< " | Sco |"<< endl;
- v1();
- Sleep(200);
- system("cls");
- v1();
- cout<< " | Scor |"<< endl;
- v1();
- Sleep(200);
- system("cls");
- v1();
- cout<< " | Score | "<< endl;
- v1();
- Sleep(200);
- system("cls");
- v1();
- cout<< " | Score: | "<< endl;
- v1();
- Sleep(200);
- system("cls");
- v1();
- cout<< " | Score: y | "<< endl;
- v1();
- Sleep(200);
- system("cls");
- v1();
- cout<< " | Score: yo | "<< endl;
- v1();
- Sleep(200);
- system("cls");
- v1();
- cout<< " | Score: you | "<< endl;
- v1();
- Sleep(200);
- system("cls");
- v1();
- cout<< " | Score: you- | "<< endl;
- v1();
- Sleep(200);
- system("cls");
- v1();
- cout<< " | Score: you- | "<< endl;
- v1();
- Sleep(200);
- system("cls");
- v1();
- cout<< " | Score: you-"<< score << " | |" << endl;
- v1();
- Sleep(200);
- system("cls");
- v1();
- cout<< " | Score: you-"<< score << " | c |" << endl;
- v1();
- Sleep(200);
- system("cls");
- v1();
- cout<< " | Score: you-"<< score << " | co |" << endl;
- v1();
- Sleep(200);
- system("cls");
- v1();
- cout<< " | Score: you-"<< score << " | com |" << endl;
- v1();
- Sleep(200);
- system("cls");
- v1();
- cout<< " | Score: you-"<< score << " | comp |" << endl;
- v1();
- Sleep(200);
- system("cls");
- v1();
- cout<< " | Score: you-"<< score << " | compu |" << endl;
- v1();
- Sleep(200);
- system("cls");
- v1();
- cout<< " | Score: you-"<< score << " | comput |" << endl;
- v1();
- Sleep(200);
- system("cls");
- v1();
- cout<< " | Score: you-"<< score << " | compute |" << endl;
- v1();
- Sleep(200);
- system("cls");
- v1();
- cout<< " | Score: you-"<< score << " | computer |" << endl;
- v1();
- Sleep(200);
- system("cls");
- v1();
- cout<< " | Score: you-"<< score << " | computer- |" << endl;
- v1();
- Sleep(200);
- system("cls");
- v1();
- cout<< " | Score: you-"<< score << " | computer-" << l << " |" << endl;
- v1();
- Sleep(2000);
- system("cls");
- if (score >= fscore)
- {
- system("cls");
- cout<<"You keep your data... For now" << endl;
- Sleep(3000);
- system("cls");
- }
- else
- {
- system("cls");
- cout<<"Your hdd would've been formatted it this wasnt a test" << endl;
- Sleep(3000);
- system("cls");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement