-
Notifications
You must be signed in to change notification settings - Fork 0
/
controllerTests.h
70 lines (65 loc) · 968 Bytes
/
controllerTests.h
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
#pragma once
using namespace std;
void firstTest();
void secondTest();
void thirdTest();
// CLEAR ARROWS
void clrTests()
{
for(int i = 8; i < 15; i += 2)
{
pos(62, i);
cout<<" ";
pos(20, i);
cout<<" ";
}
}
// FUNC TO CONTROL THE MENU
void controllerTests()
{
int x2=20, x1=62, y=8, key, choice=1;
pos(x1, y);
cout<<"*";
pos(x2, y);
cout<<"*";
while(true)
{
key=_getch();
if((key == 72) && (y > 8))
{
y-=2;
choice--;
clrTests();
}
if((key == 80) && (y < 14))
{
y+=2;
choice++;
clrTests();
}
if((choice==1) && (key==13))
{
firstTest();
}
if((choice==2) && (key==13))
{
secondTest();
}
if((choice==3) && (key==13))
{
thirdTest();
}
if((choice==4) && (key==13))
{
system("cls");
mainMenu();
mainController();
clrTests();
}
clrTests();
pos(x1, y);
cout<<"*";
pos(x2, y);
cout<<"*";
}
}