-
Notifications
You must be signed in to change notification settings - Fork 0
/
stage.cpp
121 lines (110 loc) · 2.17 KB
/
stage.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
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
#include "stage.hpp"
Stage::Stage()
{
score = 0;
gameStage = 0;
}
Stage::~Stage()
{
score = 0;
gameStage = 0;
}
int Stage::getGameStage()
{
return gameStage;
}
int Stage::getScore()
{
return score;
}
void Stage::up()
{
gameStage += 1; // nastepny etap
switch (gameStage) // próg gwarantowany
{
case 1:
cout << "Wygrales 100 zl" << endl;
score = 100;
break;
case 2:
cout << "Wygrana 200 zl" << endl;
score = 200;
break;
case 3:
cout << "Wygrana 300 zl" << endl;
score = 300;
break;
case 4:
cout << "Wygrana 500 zl" << endl;
score = 500;
break;
case 5:
cout << "Prog gwarantowany 1000 zl" << endl;
score = 1000;
break;
case 6:
cout << "Wygrana 2000 zl" << endl;
score = 2000;
break;
case 7:
cout << "Wygrana 4000 zl" << endl;
score = 4000;
break;
case 8:
cout << "Wygrana 8000 zl" << endl;
score = 8000;
break;
case 9:
cout << "Wygrana 9000 zl" << endl;
score = 9000;
break;
case 10:
cout << "Prog gwarantowany 32 000 zl" << endl;
score = 32000;
break;
case 11:
cout << "Wygrana 64 000 zl" << endl;
score = 64000;
break;
case 12:
cout << "Wygrana 125 000 zl" << endl;
score = 125000;
break;
case 13:
cout << "Wygrana 250 000 zl" << endl;
score = 250000;
break;
case 14:
cout << "Wygrana 500 000 zl" << endl;
score = 500000;
break;
case 15:
cout << "Wygrana 1 000 000 zl" << endl;
score = 1000000;
break;
default:
break;
}
}
int Stage::end()
{
int result = score;
if(gameStage <= 5)
result = 0;
if ((gameStage <= 10) && (gameStage >= 6))
result = 1000;
if(gameStage >= 11)
result = 32000;
if(gameStage >= 15)
result = 1000000;
gameStage = 0;
score = 0;
return result;
}
int Stage::giveup()
{
int result = score;
gameStage = 0;
score = 0;
return result;
}