-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
56 lines (54 loc) · 1.19 KB
/
main.cpp
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
#include <iostream>
#include "Baseball.h"
using namespace std;
int main()
{
Baseball B;
bool sim;
bool stats=false;
int option = 0;
while(option != 3)
{
option = B.mainMenu();
switch(option)
{
case 1:
{
sim = false;
B.buildLineups(sim);
B.scorecard(sim);
stats=true;
}break;
case 2:
{
sim = true;
if(!stats)
{
B.buildLineups(sim);
B.scorecard(sim);
}
else
{
string ans;
cout<<"Use current lineup? (Y/N): ";
cin>>ans;
if(ans=="Y")
{
B.scorecard(sim);
}
else
{
B.buildLineups(sim);
B.scorecard(sim);
}
}
stats=true;
}break;
}
}
if(option == 3)
{
cout << "Goodbye" << endl;
}
return 0;
}