-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
41 lines (33 loc) · 916 Bytes
/
main.cpp
File metadata and controls
41 lines (33 loc) · 916 Bytes
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
// Dan Ortiz
// CPSC 121-01
// This program determines the winner in a Rock, Paper, Scissors game... with a "twist".
// The programmer inputs a strength level into the object's constructor and the program
// chooses the winner based on the strength level between two objects (ex. Rock v. Paper).
#include <iostream>
#include "rps.h"
using namespace std;
int main(){
// Declared and initialized object for Tool, Rock, Paper, and Scissors
Tool t;
Rock r(3);
Paper p(4);
Scissors s(5);
r.setStrength(1);
cout << r.getStrength() << endl;
cout << r.fight(s) << endl;
/*
// Rock vs. Scissors
checkWinner(r.fight(s), r, s);
// Rock vs. Paper
checkWinner(r.fight(p), r, p);
// Paper vs. Rock
checkWinner(p.fight(r), p, r);
// Paper vs. Scissors
checkWinner(p.fight(s), p, s);
// Scissors vs. Rock
checkWinner(s.fight(r), s, r);
// Scissors vs. Paper
checkWinner(s.fight(p), s, p);
*/
return 0;
}