-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMain.cpp
More file actions
38 lines (34 loc) · 770 Bytes
/
Copy pathMain.cpp
File metadata and controls
38 lines (34 loc) · 770 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
#include <iostream>
#include <limits>
#include "Generator.h"
int main(void)
{
unsigned int choice = 0;
bool validChoice = false;
std::cout << "---Options---\n[0] Generate all cosmetics\n[1] Generate new cosmetics only\n";
do
{
if (!(std::cin >> choice) || choice > 1) // forces choices to be 0 or 1
{
std::cout << "Invalid input, try again" << std::endl;
std::cin.clear();
std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
}
else
{
if (choice) // 1
{
std::cout << "Generating new.." << std::endl;
generate(true);
}
else // 0
{
std::cout << "Generating all.." << std::endl;
generate();
}
validChoice = true;
}
}
while (!validChoice);
return 0;
}