-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.cpp
More file actions
57 lines (52 loc) · 971 Bytes
/
Copy pathMain.cpp
File metadata and controls
57 lines (52 loc) · 971 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// main.cpp
#include <fstream>
#include <iostream>
#include "Field.h"
void start(Field& userMap);
void options(Field& userMap);
using namespace std;
void main()
{
Field userMap;
unsigned int command = 0;
while (true)
{
system("cls");
cout << "Hello. This is ''Predators & Victims'' model." << endl
<< "1 to start new model." << endl
<< "2 to load model." << endl
<< "3 to change options" << endl
<< "4 to quit program" << endl;
// Îæèäàíèå ïðàâèëüíîé êîìàíäû è å¸ ïîñëåäóþùåå âûïîëíåíèå
cin >> command;
switch (command)
{
case 1:
system("cls");
userMap.empty();
start(userMap);
command = 0;
break;
case 2:
userMap.empty();
userMap.LoadMap();
command = 0;
break;
case 3:
system("cls");
options(userMap);
command = 0;
break;
case 4:
system("cls");
cout << "Break!";
return;
default:
cout << "Try again" << endl;
cin.clear();
cin.sync();
cin >> command;
}
}
return;
}