Rock, Paper, Scissors, Lizard, Spock! Help!

Alright so I have 98% of this code completed everything works. However I need help trying to figure out where the last piece of the code goes. The "Congratulations" Part. I mean I was think about doing something like.

int W;
if (W ==2)
cout << "Congratulations";

But I'm not sure that will work or where I should put it!

Rock, Paper, Scissors, Lizard, Spock! is an extension of the classic rock, paper, scissors game between
two players. This version of the game adds two weapons, Lizard and Spock. The user plays the
computer. The player picks one of the five weapons and the computer’s weapon is chosen randomly
from the five. The outcome is determined based on those choices. It is a tie if the same weapon chosen
by the user and computer. If they are different the outcome is determined as follows. The rationale for
the outcome is in parenthesis.
• Scissors beats Paper (Scissors CUTS Paper)
• Paper beats Rock (Paper COVERS Rock)
• Rock beats Lizard (Rock CRUSHES Lizard)
• Lizard beats Spock! (Lizard POISONS Spock)
• Spock! beats Scissors (Spock SMASHES Scissors)
• Scissors beats Lizard (Scissors DECAPITATES Lizard)
• Lizard beats Paper (Lizard EATS Paper)
• Paper beats Spock! (Paper DISPROVES Spock)
• Spock! beats Rock (Spock VAPORIZES Rock)
• Rock beats Scissors (Rock CRUSHES Scissors)
Write a C++ program that implements Rock, Paper, Scissors, Lizard, Spock! The user will check for valid
input a positive integer between 1 and 5. The user plays until either the user or the computer wins the
best two of three games. Output should look similar to below.
Sample Run:
Welcome! The best 2 of 3 games wins!
Choose:
scissor (1)
rock (2)
paper (3)
lizard (4)
Spock! (5): 1
The computer is scissor. You are scissor too. -It is a draw
Choose:
scissor (1)
rock (2)
paper (3)
lizard (4)
Spock! (5): 4
The computer is rock. You are lizard. (Rock CRUSHES Lizard)- You loose
Choose:
scissor (1)
3
rock (2)
paper (3)
lizard (4)
Spock! (5): 3
The computer is Spock! You are paper. (Paper DISPROVES Spock)- You win
Choose:
scissor (1)
rock (2)
paper (3)
lizard (4)
Spock! (5): 2
The computer is lizard. You are rock. (Rock CRUSHES Lizard)- You win
Congratulations- You beat the computer: 2 games to 1


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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
  #include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;


int main()
{

	

		int PlayerChoice;
	

		cout << "Welcome to Rock, Paper, Scissors, Lizard, Spock." << endl;
		cout << "The best of 2 of 3 games Wins!!" << endl;
		cout << "Choose: " << endl;
		cout << "Scissor (1)" << endl;
		cout << "Rock (2)" << endl;
		cout << "Paper (3)" << endl;
		cout << "Lizard (4)" << endl;
		cout << "Spock! (5): "; cin >> PlayerChoice;

	int CompChoice;

	srand(time(0));

	CompChoice = rand() % 5 + 1;



	if (CompChoice == 1)
	{
		CompChoice = 1;


	}

	else if (CompChoice == 2)
	{
		CompChoice = 2;


	}

	else if (CompChoice == 3)
	{
		CompChoice = 3;


	}

	else if (CompChoice == 4)
	{
		CompChoice = 4;


	}
	else if (CompChoice == 5)
	{
		CompChoice = 5;

	}


	if (PlayerChoice == 1)
	{

	}

	else if (PlayerChoice == 2)
	{

	}

	else if (PlayerChoice == 3)
	{

	}

	else if (PlayerChoice == 4)
	{

	}

	else if (PlayerChoice == 5)
	{

	}


		if (PlayerChoice == 1 && CompChoice == 1)
		{
			cout << "The Computer is Scissors.";
			cout << "You are Scissors too.";
			cout << "-It is a draw!" << endl;

		}
		else if (PlayerChoice == 2 && CompChoice == 2)
		{
			cout << "The Computer is Rock.";
			cout << "You are Rock too.";
			cout << "-It is a draw!" << endl;

		}
		else if (PlayerChoice == 3 && CompChoice == 3)
		{
			cout << "The Computer is Paper.";
			cout << "You are Paper too.";
			cout << "-It is a draw!" << endl;

		}
		else if (PlayerChoice == 4 && CompChoice == 4)
		{
			cout << "The Computer is Lizard.";
			cout << "You are a Lizard too.";
			cout << "-It is a draw!" << endl;

		}
		else if (PlayerChoice == 5 && CompChoice == 5)
		{

			cout << "The Computer is Spock!";
			cout << "You are Spock too!";
			cout << "-It is a Draw! " << endl;
		}

		else if (PlayerChoice == 3 && CompChoice == 2)
		{
			cout << "The Computer is Rock.";
			cout << "You are Paper.";
			cout << "(Paper COVERS Rock)";
			cout << "-You WIN!" << endl;
		}
		else if (PlayerChoice == 2 && CompChoice == 1)
		{
			cout << "The Computer is Scissors.";
			cout << "You are Rock.";
			cout << "(Rock CRUSHES Scissors)";
			cout << "-You WIN!";
		}
		else if (PlayerChoice == 1 && CompChoice == 4)
		{
			cout << "The Computer is Lizard.";
			cout << "You are Scissors.";
			cout << "(Scissors DECAPITATES Lizard)";
			cout << "-You WIN!" << endl;
		}
		else if (PlayerChoice == 4 && CompChoice == 5)
		{
			cout << "The Computer is Spock.";
			cout << "You are Lizard.";
			cout << "(Lizard POISONS Spock)";
			cout << "-You WIN!" << endl;
		}
		else if (PlayerChoice == 3 && CompChoice == 5)
		{
			cout << "The Computer is Spock.";
			cout << "You are Paper.";
			cout << "(Paper DISPROVES Spock)";
			cout << "-You WIN!" << endl;
		}
		else if (PlayerChoice == 4 && CompChoice == 3)
		{
			cout << "The Computer is Paper.";
			cout << "You are Lizard.";
			cout << "(Lizard EATS Paper)";
			cout << "-You WIN!" << endl;
		}
		else if (PlayerChoice == 2 && CompChoice == 4)
		{
			cout << "The Computer is Lizard.";
			cout << "You are Rock.";
			cout << "(Rock CRUSHES Lizard)";
			cout << "-You WIN!" << endl;
		}
		else if (PlayerChoice == 5 && CompChoice == 2)
		{
			cout << "The Computer is Rock.";
			cout << "You are Spock.";
			cout << "(Spock VAPORIZES Rock)";
			cout << "-You Win!" << endl;
		}
		else if (PlayerChoice == 5 && CompChoice == 1)
		{
			cout << "The Computer is Scissors.";
			cout << "You are Spock.";
			cout << "(Spock SMASHES Scissors)";
			cout << "-You WIN!" << endl;
		}
		else if (PlayerChoice == 1 && CompChoice == 3)
		{
			cout << "The Computer is Paper.";
			cout << "You are Scissors.";
			cout << "(Scissors CUTS Paper)";
			cout << "-You WIN!" << endl;
		}

		else if (PlayerChoice == 2 && CompChoice == 3)
		{
			cout << "The Computer is Paper.";
			cout << "You are Rock.";
			cout << "(Paper COVERS Rock)";
			cout << "-You LOSE!" << endl;
		}
		else if (PlayerChoice == 1 && CompChoice == 2)
		{
			cout << "The Computer is Rock.";
			cout << "You are Scissors.";
			cout << "(Rock CRUSHES Scissors)";
			cout << "-You LOSE!" << endl;
		}
		else if (PlayerChoice == 4 && CompChoice == 1)
		{
			cout << "The Computer is Scissors.";
			cout << "You are Lizard.";
			cout << "(Scissors DECAPITATES Lizard)";
			cout << "-You LOSE!" << endl;
		}
		else if (PlayerChoice == 5 && CompChoice == 4)
		{
			cout << "The Computer is Lizard.";
			cout << "You are Spock.";
			cout << "(Lizard POISONS Spock)";
			cout << "-You LOSE!" << endl;
		}
		else if (PlayerChoice == 5 && CompChoice == 3)
		{
			cout << "The Computer is Paper.";
			cout << "You are Spock";
			cout << "(Paper DISPROVES Spock)";
			cout << "-You LOSE!" << endl;
		}
		else if (PlayerChoice == 3 && CompChoice == 4)
		{
			cout << "The Computer is Lizard.";
			cout << "You are Paper.";
			cout << "(Lizard EATS Paper)";
			cout << "-You LOSE!" << endl;
		}
		else if (PlayerChoice == 4 && CompChoice == 2)
		{
			cout << "The Computer is Rock.";
			cout << "You are Lizard.";
			cout << "(Rock CRUSHES Lizard)";
			cout << "-You LOSE!" << endl;
		}
		else if (PlayerChoice == 2 && CompChoice == 5)
		{
			cout << "The Computer is Spock.";
			cout << "You are Rock.";
			cout << "(Spock VAPORIZES Rock)";
			cout << "-You LOSE!" << endl;
		}
		else if (PlayerChoice == 1 && CompChoice == 5)
		{
			cout << "The Computer is Spock";
			cout << "You are Scissors";
			cout << "(Spock SMASHES Scissors)";
			cout << "-You LOSE!" << endl;
		}
		else if (PlayerChoice == 3 && CompChoice == 1)
		{
			cout << "The Computer is Scissors.";
			cout << "You are Paper.";
			cout << "(Scissors CUTS Paper)";
			cout << "-You LOSE!" << endl;
		}


	cin.get();
	return 0;
}


Thanks in advance!
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;


int main()
{

		int r = 0;  //Variable to hold the round
		int W = 0;   //Variable to hold the win
		int L = 0;   // Variable to hold the lose
		int PlayerChoice;


		// Welcoming you to the game and listing the choices available
		cout << "Welcome to Rock, Paper, Scissors, Lizard, Spock." << endl;
		cout << "The best of 2 of 3 games Wins!!" << endl;
		cout << "Choose: " << endl;
		cout << "Scissor (1)" << endl;
		cout << "Rock (2)" << endl;
		cout << "Paper (3)" << endl;
		cout << "Lizard (4)" << endl;
		cout << "Spock! (5): "; cin >> PlayerChoice; // Getting the player's choice 

		int CompChoice; // Variable to hold the computers choice

		srand(time(0));

		CompChoice = rand() % 5 + 1; //To hold the random number


		//Computer choosing random number
		if (CompChoice == 1)
		{
			CompChoice = 1;


		}

		else if (CompChoice == 2)
		{
			CompChoice = 2;


		}

		else if (CompChoice == 3)
		{
			CompChoice = 3;


		}

		else if (CompChoice == 4)
		{
			CompChoice = 4;


		}
		else if (CompChoice == 5)
		{
			CompChoice = 5;

		}

		// Getting your choice
		if (PlayerChoice == 1)
		{

		}

		else if (PlayerChoice == 2)
		{

		}

		else if (PlayerChoice == 3)
		{

		}

		else if (PlayerChoice == 4)
		{

		}

		else if (PlayerChoice == 5)
		{

		}

		//Comparing the two numbers to get the appropriate answer.
		if (PlayerChoice == 1 && CompChoice == 1)
		{
			cout << "The Computer is Scissors.";
			cout << "You are Scissors too.";
			cout << "-It is a draw!" << endl;
			r++;
		}
		else if (PlayerChoice == 2 && CompChoice == 2)
		{
			cout << "The Computer is Rock.";
			cout << "You are Rock too.";
			cout << "-It is a draw!" << endl;
			r++;
		}
		else if (PlayerChoice == 3 && CompChoice == 3)
		{
			cout << "The Computer is Paper.";
			cout << "You are Paper too.";
			cout << "-It is a draw!" << endl;
			r++;
		}
		else if (PlayerChoice == 4 && CompChoice == 4)
		{
			cout << "The Computer is Lizard.";
			cout << "You are a Lizard too.";
			cout << "-It is a draw!" << endl;
			r++;
		}
		else if (PlayerChoice == 5 && CompChoice == 5)
		{

			cout << "The Computer is Spock!";
			cout << "You are Spock too!";
			cout << "-It is a Draw! " << endl;
			r++;
		}

		else if (PlayerChoice == 3 && CompChoice == 2)
		{
			cout << "The Computer is Rock.";
			cout << "You are Paper.";
			cout << "(Paper COVERS Rock)";
			cout << "-You WIN!" << endl;
			r++;
			W++;

		}
		else if (PlayerChoice == 2 && CompChoice == 1)
		{
			cout << "The Computer is Scissors.";
			cout << "You are Rock.";
			cout << "(Rock CRUSHES Scissors)";
			cout << "-You WIN!";
			r++;
			W++;
		}
		else if (PlayerChoice == 1 && CompChoice == 4)
		{
			cout << "The Computer is Lizard.";
			cout << "You are Scissors.";
			cout << "(Scissors DECAPITATES Lizard)";
			cout << "-You WIN!" << endl;
			r++;
			W++;
		}
		else if (PlayerChoice == 4 && CompChoice == 5)
		{
			cout << "The Computer is Spock.";
			cout << "You are Lizard.";
			cout << "(Lizard POISONS Spock)";
			cout << "-You WIN!" << endl;
			r++;
			W++;
		}
		else if (PlayerChoice == 3 && CompChoice == 5)
		{
			cout << "The Computer is Spock.";
			cout << "You are Paper.";
			cout << "(Paper DISPROVES Spock)";
			cout << "-You WIN!" << endl;
			r++;
			W++;
		}
		else if (PlayerChoice == 4 && CompChoice == 3)
		{
			cout << "The Computer is Paper.";
			cout << "You are Lizard.";
			cout << "(Lizard EATS Paper)";
			cout << "-You WIN!" << endl;
			r++;
			W++;
		}
		else if (PlayerChoice == 2 && CompChoice == 4)
		{
			cout << "The Computer is Lizard.";
			cout << "You are Rock.";
			cout << "(Rock CRUSHES Lizard)";
			cout << "-You WIN!" << endl;
			r++;
			W++;
		}
		else if (PlayerChoice == 5 && CompChoice == 2)
		{
			cout << "The Computer is Rock.";
			cout << "You are Spock.";
			cout << "(Spock VAPORIZES Rock)";
			cout << "-You Win!" << endl;
			r++;
			W++;
		}
		else if (PlayerChoice == 5 && CompChoice == 1)
		{
			cout << "The Computer is Scissors.";
			cout << "You are Spock.";
			cout << "(Spock SMASHES Scissors)";
			cout << "-You WIN!" << endl;
			r++;
			W++;
		}
		else if (PlayerChoice == 1 && CompChoice == 3)
		{
			cout << "The Computer is Paper.";
			cout << "You are Scissors.";
			cout << "(Scissors CUTS Paper)";
			cout << "-You WIN!" << endl;
			r++;
			W++;
		}

		else if (PlayerChoice == 2 && CompChoice == 3)
		{
			cout << "The Computer is Paper.";
			cout << "You are Rock.";
			cout << "(Paper COVERS Rock)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
		else if (PlayerChoice == 1 && CompChoice == 2)
		{
			cout << "The Computer is Rock.";
			cout << "You are Scissors.";
			cout << "(Rock CRUSHES Scissors)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
		else if (PlayerChoice == 4 && CompChoice == 1)
		{
			cout << "The Computer is Scissors.";
			cout << "You are Lizard.";
			cout << "(Scissors DECAPITATES Lizard)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
		else if (PlayerChoice == 5 && CompChoice == 4)
		{
			cout << "The Computer is Lizard.";
			cout << "You are Spock.";
			cout << "(Lizard POISONS Spock)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
		else if (PlayerChoice == 5 && CompChoice == 3)
		{
			cout << "The Computer is Paper.";
			cout << "You are Spock";
			cout << "(Paper DISPROVES Spock)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
		else if (PlayerChoice == 3 && CompChoice == 4)
		{
			cout << "The Computer is Lizard.";
			cout << "You are Paper.";
			cout << "(Lizard EATS Paper)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
		else if (PlayerChoice == 4 && CompChoice == 2)
		{
			cout << "The Computer is Rock.";
			cout << "You are Lizard.";
			cout << "(Rock CRUSHES Lizard)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
		else if (PlayerChoice == 2 && CompChoice == 5)
		{
			cout << "The Computer is Spock.";
			cout << "You are Rock.";
			cout << "(Spock VAPORIZES Rock)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
		else if (PlayerChoice == 1 && CompChoice == 5)
		{
			cout << "The Computer is Spock";
			cout << "You are Scissors";
			cout << "(Spock SMASHES Scissors)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
		else if (PlayerChoice == 3 && CompChoice == 1)
		{
			cout << "The Computer is Scissors.";
			cout << "You are Paper.";
			cout << "(Scissors CUTS Paper)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
	
	if (r == 1)
	{

		if (W == 1)
		{

			cout << "Congrads" << endl;

		}
		else if (L == 1)
		{

			cout << ":(" << endl;

		}
		else
		{


		}

	}
	else
	{

		r++;

	}

	cin.get();
	return 0;
}


update!
1
2
3
int W;
if (W == 2)
cout << "Congratulations";


If you want to count a number of times a player wins, have you ever considered using a while loop?
Last edited on
everything works.
Huh? How can everything work when you never cin the player's choice?

Lines 32-63: What are these lines supposed to do? They serve no purpose. You're simply setting CompChoice to the value it already is.

Lines 66-89: These lines do nothing. Why are they there?

Line 94-304: PlayerChoice is an uninitialized variable. None of these comparisons are going to be valid.

You have no loop to play multiple rounds.


Last edited on
Hey Abstraction thanks for the tips for Lines 32-63 and lines 66-89. Also on line 24 PlayerChoice is initialized, my professor wanted it in a weird non normal way lol. Lastly, yes that is what I'm stuck on I'm trying to figure out how to make the loop do that so here is my updated code. I'm thinking about moving the very last loop to include the rest of the code so it should work what do y'all think?

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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;


int main()
{

		int r = 0;  //Variable to hold the round
		int W = 0;   //Variable to hold the win
		int L = 0;   // Variable to hold the lose
		int PlayerChoice;


		// Welcoming you to the game and listing the choices available
		cout << "Welcome to Rock, Paper, Scissors, Lizard, Spock." << endl;
		cout << "The best of 2 of 3 games Wins!!" << endl;
		cout << "Choose: " << endl;
		cout << "Scissor (1)" << endl;
		cout << "Rock (2)" << endl;
		cout << "Paper (3)" << endl;
		cout << "Lizard (4)" << endl;
		cout << "Spock! (5): "; cin >> PlayerChoice; // Getting the player's choice 

		int CompChoice; // Variable to hold the computers choice

		srand(time(0));

		CompChoice = rand() % 5 + 1; //To hold the random number



		

		//Comparing the two numbers to get the appropriate answer.
		if (PlayerChoice == 1 && CompChoice == 1)
		{
			cout << "The Computer is Scissors.";
			cout << "You are Scissors too.";
			cout << "-It is a draw!" << endl;
			r++;
		}
		else if (PlayerChoice == 2 && CompChoice == 2)
		{
			cout << "The Computer is Rock.";
			cout << "You are Rock too.";
			cout << "-It is a draw!" << endl;
			r++;
		}
		else if (PlayerChoice == 3 && CompChoice == 3)
		{
			cout << "The Computer is Paper.";
			cout << "You are Paper too.";
			cout << "-It is a draw!" << endl;
			r++;
		}
		else if (PlayerChoice == 4 && CompChoice == 4)
		{
			cout << "The Computer is Lizard.";
			cout << "You are a Lizard too.";
			cout << "-It is a draw!" << endl;
			r++;
		}
		else if (PlayerChoice == 5 && CompChoice == 5)
		{

			cout << "The Computer is Spock!";
			cout << "You are Spock too!";
			cout << "-It is a Draw! " << endl;
			r++;
		}

		else if (PlayerChoice == 3 && CompChoice == 2)
		{
			cout << "The Computer is Rock.";
			cout << "You are Paper.";
			cout << "(Paper COVERS Rock)";
			cout << "-You WIN!" << endl;
			r++;
			W++;

		}
		else if (PlayerChoice == 2 && CompChoice == 1)
		{
			cout << "The Computer is Scissors.";
			cout << "You are Rock.";
			cout << "(Rock CRUSHES Scissors)";
			cout << "-You WIN!";
			r++;
			W++;
		}
		else if (PlayerChoice == 1 && CompChoice == 4)
		{
			cout << "The Computer is Lizard.";
			cout << "You are Scissors.";
			cout << "(Scissors DECAPITATES Lizard)";
			cout << "-You WIN!" << endl;
			r++;
			W++;
		}
		else if (PlayerChoice == 4 && CompChoice == 5)
		{
			cout << "The Computer is Spock.";
			cout << "You are Lizard.";
			cout << "(Lizard POISONS Spock)";
			cout << "-You WIN!" << endl;
			r++;
			W++;
		}
		else if (PlayerChoice == 3 && CompChoice == 5)
		{
			cout << "The Computer is Spock.";
			cout << "You are Paper.";
			cout << "(Paper DISPROVES Spock)";
			cout << "-You WIN!" << endl;
			r++;
			W++;
		}
		else if (PlayerChoice == 4 && CompChoice == 3)
		{
			cout << "The Computer is Paper.";
			cout << "You are Lizard.";
			cout << "(Lizard EATS Paper)";
			cout << "-You WIN!" << endl;
			r++;
			W++;
		}
		else if (PlayerChoice == 2 && CompChoice == 4)
		{
			cout << "The Computer is Lizard.";
			cout << "You are Rock.";
			cout << "(Rock CRUSHES Lizard)";
			cout << "-You WIN!" << endl;
			r++;
			W++;
		}
		else if (PlayerChoice == 5 && CompChoice == 2)
		{
			cout << "The Computer is Rock.";
			cout << "You are Spock.";
			cout << "(Spock VAPORIZES Rock)";
			cout << "-You Win!" << endl;
			r++;
			W++;
		}
		else if (PlayerChoice == 5 && CompChoice == 1)
		{
			cout << "The Computer is Scissors.";
			cout << "You are Spock.";
			cout << "(Spock SMASHES Scissors)";
			cout << "-You WIN!" << endl;
			r++;
			W++;
		}
		else if (PlayerChoice == 1 && CompChoice == 3)
		{
			cout << "The Computer is Paper.";
			cout << "You are Scissors.";
			cout << "(Scissors CUTS Paper)";
			cout << "-You WIN!" << endl;
			r++;
			W++;
		}

		else if (PlayerChoice == 2 && CompChoice == 3)
		{
			cout << "The Computer is Paper.";
			cout << "You are Rock.";
			cout << "(Paper COVERS Rock)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
		else if (PlayerChoice == 1 && CompChoice == 2)
		{
			cout << "The Computer is Rock.";
			cout << "You are Scissors.";
			cout << "(Rock CRUSHES Scissors)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
		else if (PlayerChoice == 4 && CompChoice == 1)
		{
			cout << "The Computer is Scissors.";
			cout << "You are Lizard.";
			cout << "(Scissors DECAPITATES Lizard)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
		else if (PlayerChoice == 5 && CompChoice == 4)
		{
			cout << "The Computer is Lizard.";
			cout << "You are Spock.";
			cout << "(Lizard POISONS Spock)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
		else if (PlayerChoice == 5 && CompChoice == 3)
		{
			cout << "The Computer is Paper.";
			cout << "You are Spock";
			cout << "(Paper DISPROVES Spock)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
		else if (PlayerChoice == 3 && CompChoice == 4)
		{
			cout << "The Computer is Lizard.";
			cout << "You are Paper.";
			cout << "(Lizard EATS Paper)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
		else if (PlayerChoice == 4 && CompChoice == 2)
		{
			cout << "The Computer is Rock.";
			cout << "You are Lizard.";
			cout << "(Rock CRUSHES Lizard)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
		else if (PlayerChoice == 2 && CompChoice == 5)
		{
			cout << "The Computer is Spock.";
			cout << "You are Rock.";
			cout << "(Spock VAPORIZES Rock)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
		else if (PlayerChoice == 1 && CompChoice == 5)
		{
			cout << "The Computer is Spock";
			cout << "You are Scissors";
			cout << "(Spock SMASHES Scissors)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
		else if (PlayerChoice == 3 && CompChoice == 1)
		{
			cout << "The Computer is Scissors.";
			cout << "You are Paper.";
			cout << "(Scissors CUTS Paper)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
	
	if (r == 1)
	{

		if (W == 1)
		{

			cout << "Congrads" << endl;

		}
		else if (L == 1)
		{

			cout << ":(" << endl;

		}
		else
		{


		}

	}
	else
	{

		r++;

	}

	cin.get();
	return 0;
}
Sorry. I missed the cin on line 24. My mistake.

I would do something like this:
1
2
3
4
5
6
7
8
9
10
 
void play_round ()
{  //  body of game
}

//  Then in main: 
  do
  {  play_round ();
      r++;
   } while (r < 3);


Here's a cleaned up (and shortened) version of your code:
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;

const char * objname[5] = { "Scissors",
                            "Rock",
                            "Paper",
                            "Lizard",
                            "Spock!" };
enum result { WIN, LOSE, TIE };
                            
void greeting ()
{   // Welcoming you to the game and listing the choices available
    cout << endl;
	cout << "Welcome to Rock, Paper, Scissors, Lizard, Spock." << endl;
	cout << "The best of 2 of 3 games Wins!!" << endl;
	for (int i=0; i<5; i++)
	    cout << objname[i] << " (" << i << ")" << endl;
    cout << "Choose: " << endl;	    
}

result determine_winner (int PlayerChoice, int CompChoice)
{   PlayerChoice++;
    CompChoice++;
    if (PlayerChoice == 3 && CompChoice == 2)
	{   cout << "(Paper COVERS Rock)";
		return WIN;
	}
	if (PlayerChoice == 2 && CompChoice == 1)
	{   cout << "(Rock CRUSHES Scissors)";
        return WIN;
	}
	if (PlayerChoice == 1 && CompChoice == 4)
	{   cout << "(Scissors DECAPITATES Lizard)";
        return WIN; 
	}
	if (PlayerChoice == 4 && CompChoice == 5)
	{   cout << "(Lizard POISONS Spock)";
		return WIN;
	}
	if (PlayerChoice == 3 && CompChoice == 5)
	{   cout << "(Paper DISPROVES Spock)";
	    return WIN;		
	}
	if (PlayerChoice == 4 && CompChoice == 3)
	{   cout << "(Lizard EATS Paper)";
	    return WIN;
	}
	if (PlayerChoice == 2 && CompChoice == 4)
	{   cout << "(Rock CRUSHES Lizard)";
	    return WIN;
	}
	if (PlayerChoice == 5 && CompChoice == 2)
	{   cout << "(Spock VAPORIZES Rock)";
        return WIN;
	}
	if (PlayerChoice == 5 && CompChoice == 1)
	{   cout << "(Spock SMASHES Scissors)";
	    return WIN;
	}
	if (PlayerChoice == 1 && CompChoice == 3)
	{   cout << "(Scissors CUTS Paper)";
	    return WIN;
	}
	if (PlayerChoice == 2 && CompChoice == 3)
	{   cout << "(Paper COVERS Rock)";
	    return LOSE;
	}
	if (PlayerChoice == 1 && CompChoice == 2)
	{   cout << "(Rock CRUSHES Scissors)";
	    return LOSE;
	}
	if (PlayerChoice == 4 && CompChoice == 1)
	{   cout << "(Scissors DECAPITATES Lizard)";
	    return LOSE;
	}
	if (PlayerChoice == 5 && CompChoice == 4)
	{   cout << "(Lizard POISONS Spock)";
	    return LOSE;
	}
	if (PlayerChoice == 5 && CompChoice == 3)
	{   cout << "(Paper DISPROVES Spock)";
	    return LOSE;
	}
	if (PlayerChoice == 3 && CompChoice == 4)
	{   cout << "(Lizard EATS Paper)";
	    return LOSE;
	}
	if (PlayerChoice == 4 && CompChoice == 2)
	{   cout << "(Rock CRUSHES Lizard)";
	    return LOSE;
	}
	if (PlayerChoice == 2 && CompChoice == 5)
	{   cout << "(Spock VAPORIZES Rock)";
	    return LOSE;
	}
	if (PlayerChoice == 1 && CompChoice == 5)
	{   cout << "(Spock SMASHES Scissors)";
	    return LOSE;
	}
	if (PlayerChoice == 3 && CompChoice == 1)
	{   cout << "(Scissors CUTS Paper)";
	    return LOSE;
	}
	return TIE;
}		   		

void play_round (int & W, int & L)
{   int PlayerChoice;
    int CompChoice; // Variable to hold the computers choice
    
    greeting ();
    cin >> PlayerChoice; // Getting the player's choice     
    CompChoice = rand() % 5 + 1; //To hold the random number
    cout << "The computer is: " << objname[CompChoice] << endl;
    cout << "You are: " << objname[PlayerChoice] << endl;
    switch (determine_winner (PlayerChoice, CompChoice))
    {
    case WIN:
        cout << "- You win." << endl;
        W++;
        break;
    case LOSE:
        cout << "- You lose." << endl;
        L++;
        break;
    case TIE:
        cout << "- It's a draw." << endl;
        break;
    }        
}
    
int main()
{   int r = 0;  //Variable to hold the round
	int W = 0;   //Variable to hold the win
	int L = 0;   // Variable to hold the lose

	srand(time(0));
    do
    {   play_round(W, L);
        r++;
    } while (r < 3);   	
	cin.get();
	return 0;
}


Last edited on
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;


int main()
{


	int r = 0;  //Variable to hold the round
	int W = 0;   //Variable to hold the win
	int L = 0;   // Variable to hold the lose
	int D = 0;
	int PlayerChoice;


	// Welcoming you to the game and listing the choices available
	cout << "Welcome to Rock, Paper, Scissors, Lizard, Spock." << endl;
	cout << "The best of 2 of 3 games Wins!!" << endl;

	do
	{


		cout << "Choose: " << endl;
		cout << "Scissors (1)" << endl;
		cout << "Rock (2)" << endl;
		cout << "Paper (3)" << endl;
		cout << "Lizard (4)" << endl;
		cout << "Spock! (5): ";
		cin >> PlayerChoice; // Getting the player's choice 



		int CompChoice; // Variable to hold the computers choice

		srand(time(0));

		CompChoice = rand() % 5 + 1; //To hold the random number



									 //Comparing the two numbers to get the appropriate answer.
		if (PlayerChoice == 1 && CompChoice == 1)
		{
			cout << "The Computer is Scissors.";
			cout << " You are Scissors too!";
			cout << "-It is a draw!" << endl;
			D++;
			r++;
		}
		else if (PlayerChoice == 2 && CompChoice == 2)
		{
			cout << "The Computer is Rock.";
			cout << " You are Rock too!";
			cout << "-It is a draw!" << endl;
			D++;
			r++;
		}
		else if (PlayerChoice == 3 && CompChoice == 3)
		{
			cout << "The Computer is Paper.";
			cout << "You are Paper too.";
			cout << "-It is a draw!" << endl;
			D++;
			r++;
		}
		else if (PlayerChoice == 4 && CompChoice == 4)
		{
			cout << "The Computer is Lizard.";
			cout << " You are a Lizard too!";
			cout << "-It is a draw!" << endl;
			D++;
			r++;
		}
		else if (PlayerChoice == 5 && CompChoice == 5)
		{

			cout << "The Computer is Spock!";
			cout << " You are Spock too!";
			cout << "-It is a draw! " << endl;
			D++;
			r++;
		}

		else if (PlayerChoice == 3 && CompChoice == 2)
		{
			cout << "The Computer is Rock.";
			cout << " You are Paper.";
			cout << "(Paper COVERS Rock)";
			cout << "-You WIN!" << endl;
			r++;
			W++;

		}
		else if (PlayerChoice == 2 && CompChoice == 1)
		{
			cout << "The Computer is Scissors.";
			cout << " You are Rock.";
			cout << "(Rock CRUSHES Scissors)";
			cout << "-You WIN!";
			r++;
			W++;
		}
		else if (PlayerChoice == 1 && CompChoice == 4)
		{
			cout << "The Computer is Lizard.";
			cout << " You are Scissors.";
			cout << "(Scissors DECAPITATES Lizard)";
			cout << "-You WIN!" << endl;
			r++;
			W++;
		}
		else if (PlayerChoice == 4 && CompChoice == 5)
		{
			cout << "The Computer is Spock!";
			cout << " You are Lizard.";
			cout << "(Lizard POISONS Spock)";
			cout << "-You WIN!" << endl;
			r++;
			W++;
		}
		else if (PlayerChoice == 3 && CompChoice == 5)
		{
			cout << "The Computer is Spock!";
			cout << " You are Paper.";
			cout << "(Paper DISPROVES Spock)";
			cout << "-You WIN!" << endl;
			r++;
			W++;
		}
		else if (PlayerChoice == 4 && CompChoice == 3)
		{
			cout << "The Computer is Paper.";
			cout << " You are Lizard.";
			cout << "(Lizard EATS Paper)";
			cout << "-You WIN!" << endl;
			r++;
			W++;
		}
		else if (PlayerChoice == 2 && CompChoice == 4)
		{
			cout << "The Computer is Lizard.";
			cout << " You are Rock.";
			cout << "(Rock CRUSHES Lizard)";
			cout << "-You WIN!" << endl;
			r++;
			W++;
		}
		else if (PlayerChoice == 5 && CompChoice == 2)
		{
			cout << "The Computer is Rock.";
			cout << " You are Spock!";
			cout << "(Spock VAPORIZES Rock)";
			cout << "-You WIN!" << endl;
			r++;
			W++;
		}
		else if (PlayerChoice == 5 && CompChoice == 1)
		{
			cout << "The Computer is Scissors.";
			cout << " You are Spock!";
			cout << "(Spock SMASHES Scissors)";
			cout << "-You WIN!" << endl;
			r++;
			W++;
		}
		else if (PlayerChoice == 1 && CompChoice == 3)
		{
			cout << "The Computer is Paper.";
			cout << " You are Scissors.";
			cout << "(Scissors CUTS Paper)";
			cout << "-You WIN!" << endl;
			r++;
			W++;
		}

		else if (PlayerChoice == 2 && CompChoice == 3)
		{
			cout << "The Computer is Paper.";
			cout << " You are Rock.";
			cout << "(Paper COVERS Rock)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
		else if (PlayerChoice == 1 && CompChoice == 2)
		{
			cout << "The Computer is Rock.";
			cout << " You are Scissors.";
			cout << "(Rock CRUSHES Scissors)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
		else if (PlayerChoice == 4 && CompChoice == 1)
		{
			cout << "The Computer is Scissors.";
			cout << " You are Lizard.";
			cout << "(Scissors DECAPITATES Lizard)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
		else if (PlayerChoice == 5 && CompChoice == 4)
		{
			cout << "The Computer is Lizard.";
			cout << " You are Spock.";
			cout << "(Lizard POISONS Spock)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
		else if (PlayerChoice == 5 && CompChoice == 3)
		{
			cout << "The Computer is Paper.";
			cout << " You are Spock";
			cout << "(Paper DISPROVES Spock)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
		else if (PlayerChoice == 3 && CompChoice == 4)
		{
			cout << "The Computer is Lizard.";
			cout << " You are Paper.";
			cout << "(Lizard EATS Paper)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
		else if (PlayerChoice == 4 && CompChoice == 2)
		{
			cout << "The Computer is Rock.";
			cout << " You are Lizard.";
			cout << "(Rock CRUSHES Lizard)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
		else if (PlayerChoice == 2 && CompChoice == 5)
		{
			cout << "The Computer is Spock!";
			cout << " You are Rock.";
			cout << "(Spock VAPORIZES Rock)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
		else if (PlayerChoice == 1 && CompChoice == 5)
		{
			cout << "The Computer is Spock!";
			cout << " You are Scissors";
			cout << "(Spock SMASHES Scissors)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
		else if (PlayerChoice == 3 && CompChoice == 1)
		{
			cout << "The Computer is Scissors.";
			cout << " You are Paper.";
			cout << "(Scissors CUTS Paper)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}


	} 
	while (r);
	{

		if (W == 2)
		{

			cout << "Congratulations - You beat the computer: ";
			cout << "2 games to 1" << endl;

		}
		else if (W == 3)
		{

			cout << "Congratulations - You beat the computer: ";
			cout << "You won all 3 games!" << endl;

		}
		else if (L == 2)
		{

			cout << "Sorry - The computer beat you: ";
			cout << "2 games to 1." << endl;

		}
		else if (L == 3)
		{

			cout << "Sorry - The computer beat you: ";
			cout << "The computer won all 3 games!" << endl;

		}
		else 
		{
			r++;

		}
	}

	cin.ignore();
	cin.get();
	return 0;
}
Here is the final code for anyone that needs help with this!

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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;


int main()
{


	int r = 0;  //Variable to hold the round
	int W = 0;   //Variable to hold the wins
	int L = 0;   // Variable to hold the loses
	int D = 0;   // Variable to hold the draws
	int PlayerChoice;


	// Welcoming you to the game and listing the choices available
	cout << "Welcome to Rock, Paper, Scissors, Lizard, Spock." << endl;
	cout << "The best of 2 of 3 games Wins!!" << endl;

	do
	{


		cout << "Choose: " << endl;
		cout << "Scissors (1)" << endl;
		cout << "Rock (2)" << endl;
		cout << "Paper (3)" << endl;
		cout << "Lizard (4)" << endl;
		cout << "Spock! (5): ";
		cin >> PlayerChoice; // Getting the player's choice 



		int CompChoice; // Variable to hold the computers choice

		srand(time(0));

		CompChoice = rand() % 5 + 1; //To hold the random number



		 //Comparing the two numbers to get the appropriate answer.
		if (PlayerChoice == 1 && CompChoice == 1)
		{
			cout << "The Computer is Scissors.";
			cout << " You are Scissors too!";
			cout << "-It is a draw!" << endl;
			D++;
			
		}
		else if (PlayerChoice == 2 && CompChoice == 2)
		{
			cout << "The Computer is Rock.";
			cout << " You are Rock too!";
			cout << "-It is a draw!" << endl;
			D++;
			
		}
		else if (PlayerChoice == 3 && CompChoice == 3)
		{
			cout << "The Computer is Paper.";
			cout << "You are Paper too.";
			cout << "-It is a draw!" << endl;
			D++;
			
		}
		else if (PlayerChoice == 4 && CompChoice == 4)
		{
			cout << "The Computer is Lizard.";
			cout << " You are a Lizard too!";
			cout << "-It is a draw!" << endl;
			D++;
			
		}
		else if (PlayerChoice == 5 && CompChoice == 5)
		{

			cout << "The Computer is Spock!";
			cout << " You are Spock too!";
			cout << "-It is a draw! " << endl;
			D++;
			
		}

		else if (PlayerChoice == 3 && CompChoice == 2)
		{
			cout << "The Computer is Rock.";
			cout << " You are Paper.";
			cout << "(Paper COVERS Rock)";
			cout << "-You WIN!" << endl;
			r++;
			W++;

		}
		else if (PlayerChoice == 2 && CompChoice == 1)
		{
			cout << "The Computer is Scissors.";
			cout << " You are Rock.";
			cout << "(Rock CRUSHES Scissors)";
			cout << "-You WIN!" << endl;
			r++;
			W++;
		}
		else if (PlayerChoice == 1 && CompChoice == 4)
		{
			cout << "The Computer is Lizard.";
			cout << " You are Scissors.";
			cout << "(Scissors DECAPITATES Lizard)";
			cout << "-You WIN!" << endl;
			r++;
			W++;
		}
		else if (PlayerChoice == 4 && CompChoice == 5)
		{
			cout << "The Computer is Spock!";
			cout << " You are Lizard.";
			cout << "(Lizard POISONS Spock)";
			cout << "-You WIN!" << endl;
			r++;
			W++;
		}
		else if (PlayerChoice == 3 && CompChoice == 5)
		{
			cout << "The Computer is Spock!";
			cout << " You are Paper.";
			cout << "(Paper DISPROVES Spock)";
			cout << "-You WIN!" << endl;
			r++;
			W++;
		}
		else if (PlayerChoice == 4 && CompChoice == 3)
		{
			cout << "The Computer is Paper.";
			cout << " You are Lizard.";
			cout << "(Lizard EATS Paper)";
			cout << "-You WIN!" << endl;
			r++;
			W++;
		}
		else if (PlayerChoice == 2 && CompChoice == 4)
		{
			cout << "The Computer is Lizard.";
			cout << " You are Rock.";
			cout << "(Rock CRUSHES Lizard)";
			cout << "-You WIN!" << endl;
			r++;
			W++;
		}
		else if (PlayerChoice == 5 && CompChoice == 2)
		{
			cout << "The Computer is Rock.";
			cout << " You are Spock!";
			cout << "(Spock VAPORIZES Rock)";
			cout << "-You WIN!" << endl;
			r++;
			W++;
		}
		else if (PlayerChoice == 5 && CompChoice == 1)
		{
			cout << "The Computer is Scissors.";
			cout << " You are Spock!";
			cout << "(Spock SMASHES Scissors)";
			cout << "-You WIN!" << endl;
			r++;
			W++;
		}
		else if (PlayerChoice == 1 && CompChoice == 3)
		{
			cout << "The Computer is Paper.";
			cout << " You are Scissors.";
			cout << "(Scissors CUTS Paper)";
			cout << "-You WIN!" << endl;
			r++;
			W++;
		}

		else if (PlayerChoice == 2 && CompChoice == 3)
		{
			cout << "The Computer is Paper.";
			cout << " You are Rock.";
			cout << "(Paper COVERS Rock)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
		else if (PlayerChoice == 1 && CompChoice == 2)
		{
			cout << "The Computer is Rock.";
			cout << " You are Scissors.";
			cout << "(Rock CRUSHES Scissors)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
		else if (PlayerChoice == 4 && CompChoice == 1)
		{
			cout << "The Computer is Scissors.";
			cout << " You are Lizard.";
			cout << "(Scissors DECAPITATES Lizard)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
		else if (PlayerChoice == 5 && CompChoice == 4)
		{
			cout << "The Computer is Lizard.";
			cout << " You are Spock.";
			cout << "(Lizard POISONS Spock)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
		else if (PlayerChoice == 5 && CompChoice == 3)
		{
			cout << "The Computer is Paper.";
			cout << " You are Spock";
			cout << "(Paper DISPROVES Spock)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
		else if (PlayerChoice == 3 && CompChoice == 4)
		{
			cout << "The Computer is Lizard.";
			cout << " You are Paper.";
			cout << "(Lizard EATS Paper)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
		else if (PlayerChoice == 4 && CompChoice == 2)
		{
			cout << "The Computer is Rock.";
			cout << " You are Lizard.";
			cout << "(Rock CRUSHES Lizard)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
		else if (PlayerChoice == 2 && CompChoice == 5)
		{
			cout << "The Computer is Spock!";
			cout << " You are Rock.";
			cout << "(Spock VAPORIZES Rock)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
		else if (PlayerChoice == 1 && CompChoice == 5)
		{
			cout << "The Computer is Spock!";
			cout << " You are Scissors";
			cout << "(Spock SMASHES Scissors)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}
		else if (PlayerChoice == 3 && CompChoice == 1)
		{
			cout << "The Computer is Scissors.";
			cout << " You are Paper.";
			cout << "(Scissors CUTS Paper)";
			cout << "-You LOSE!" << endl;
			r++;
			L++;
		}


	} 
	while (r <= 2);
	{

		if (W == 2)
		{

			cout << "Congratulations - You beat the computer: ";
			cout << "2 games to 1" << endl;

		}
		else if (W == 3)
		{

			cout << "Congratulations - You beat the computer: ";
			cout << "You won all 3 games!" << endl;

		}
		else if (L == 2)
		{

			cout << "Sorry - The computer beat you: ";
			cout << "2 games to 1." << endl;

		}
		else if (L == 3)
		{

			cout << "Sorry - The computer beat you: ";
			cout << "The computer won all 3 games!" << endl;

		}
		else
		{



		}

	}

	cin.ignore();
	cin.get();
	return 0;
}
Topic archived. No new replies allowed.