-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.cpp
More file actions
96 lines (86 loc) · 1.39 KB
/
Main.cpp
File metadata and controls
96 lines (86 loc) · 1.39 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
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
#ifndef MAIN_CPP
#define MAIN_CPP
/*
Project : Universe
By : Mast
Date : August '14
*/
#include "Universe.hpp"
struct Planet;
struct Universe;
int main()
{
Universe Uno("Uno");
Uno.readCSV();
bool exit = false;
while (!exit)
{
system("cls");
std::cout << "Welcome to the Galaxy Management Unit (GMU)." << '\n'
<< '\n'
<< "0. Print." << '\n'
<< '\n'
<< "Or pick a coordinate/building to sort on:" << '\n'
<< '\n'
<< "1. X" << '\n'
<< "2. Y." << '\n'
<< "3. Z." << '\n'
<< '\n'
<< "4. Metal Mine." << '\n'
<< "5. Crystal Mine." << '\n'
<< "6. Deuterium Synthesizer." << '\n'
<< '\n'
<< "7. Metal Storage." << '\n'
<< "8. Crystal Storage." << '\n'
<< "9. Deuterium Storage." << '\n'
<< '\n'
<< "999. Exit." << '\n'
<< '\n'
<< "Choice: "
;
int choice;
std::cin >> choice;
switch (choice)
{
case 0:
Uno.printUniverse();
std::cin.sync();
std::cin.clear();
std::cin.get();
break;
case 1:
Uno.sort_x();
break;
case 2:
Uno.sort_y();
break;
case 3:
Uno.sort_z();
break;
case 4:
Uno.sort_Mlvl();
break;
case 5:
Uno.sort_Clvl();
break;
case 6:
Uno.sort_Dlvl();
break;
case 7:
Uno.sort_Mstor();
break;
case 8:
Uno.sort_Cstor();
break;
case 9:
Uno.sort_Dstor();
break;
case 999:
exit = true;
break;
default:
break;
}
}
}
#endif