-
Notifications
You must be signed in to change notification settings - Fork 374
Expand file tree
/
Copy pathRockPaperScissorsGame.cpp
More file actions
57 lines (56 loc) · 1.77 KB
/
RockPaperScissorsGame.cpp
File metadata and controls
57 lines (56 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*This program will run a game named Rock, Paper, Scissors, Lizard, Spock.
Author: Andrei Hulk
*/
#include <iostream>
#include <stdlib.h>
using namespace std;
int main() {
// Live long and prosper
srand (time(NULL));
int computer = rand() % 3 + 1;
int userChoice = 0;
// The begining of the game
cout << "======================\n";
cout << "Rock, Paper, Scissors!\n";
cout << "======================\n";
/*
rock > scissors
scissors > paper
paper > rock
*/
cout << "1) ✊\n";
cout << "2) ✋\n";
cout << "3) ✌️\n";
// Choosing carachter
cout << "Choose your battle thing! \n";
cin >> user;
if( user == 1 )
cout << "You have a good thing:✊ ,but \n";
if( user == 2 )
cout << "You have a good thing:✋ ,but \n";
if( user == 3 )
cout << "You have a good thing:✌️ ,but \n";
if( computer == 1 )
cout << "Computer has a good thing either:✊ ,so:\n";
if( computer == 2 )
cout << "Computer has a good thing either:✋ ,so:\n";
if( computer == 3 )
cout << "Computer has a good thing either:✌️ ,so:\n";
// The BATTLE
if( user == computer )
cout << "Its an equal fair\n";
if( user == 1 && computer == 2 )
cout << "Computer`s paper just covered your poor rock :((\n";
if( user == 1 && computer == 3 )
cout << "Thats great! You are a scissor smasher :))\n";
if( user == 2 && computer == 1 )
cout << "You really covered the computer`s little rock :))\n";
if( user == 2 && computer == 3 )
cout << "Thats sad! You are papercutted :((\n";
if( user == 3 && computer == 1 )
cout << "Sorry! Your scissor is in pieces :((\n";
if( user == 3 && computer == 2 )
cout << "Wowww! You really cutted that paper :))\n";
if( user > 3 )
cout << "You can`t compete with nothing, its really unfair\n";
}