-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
272 lines (205 loc) · 6.17 KB
/
main.cpp
File metadata and controls
272 lines (205 loc) · 6.17 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
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
#include <iostream>
#include <string>
using namespace std;
int main()
{
/*
//DEFINING THE MAP!
int i=1;
int x=1;
int y=1;
int position[2];
position[1]=1;
position[2]=4;
//int Orientation=1; // 1 forward, 2 down, 3 backward, 4 up.
int map_position [4][65][3]; //[Orientation][cell] [position x,position y, wall(1) or not(0)]
//Define forward movement
for (i=1;i<65;i++){
map_position[1][i][1]=x;
map_position[1][i][2]=y;
if (i==8 || i==9 || i==13 || i==14 || i==16 || i==26 || i==27 || i==29 || i==30 || i==32 || i==35 || i==39 || i==40 || i==41 || i==42 || i==43 || i==44 || i==45 || i==46 || i==48 || i==50 || i==51 || i==52 || i==54 || i==56 || i==57 || i==61)
{
map_position[1][i][3]=1; //All the movements with a wall
}
else
{
map_position[1][i][3]=0; //All the movements without a wall
}
if (x==8)
{
x=1;
y++;
}
else
{
x++;
}
}
x=1;
y=1;
//Define down movement
for (i=1;i<65;i++){
map_position[2][i][1]=x;
map_position[2][i][2]=y;
if (i==2 || i==3 || i==4 || i==5 || i==7 || i==10 || i==11 || i==12 || i==15 || i==17 || i==18 || i==20 || i==21 || i==23 || i==25 || i==29 || i==31 || i==33 || i==38 || i==46 || i==47 || i==51 || i==52 || i==53 || i==57 || i==58 || i==59 || i==60 || i==61 || i==62 || i==63 || i==64)
{
map_position[2][i][3]=1; //All the movements with a wall
}
else
{
map_position[2][i][3]=0; //All the movements without a wall
}
if (x==8)
{
x=1;
y++;
}
else
{
x++;
}
}
x=1;
y=1;
//Define backward movement
for (i=1;i<65;i++){
map_position[3][i][1]=x;
map_position[3][i][2]=y;
if (i==1 || i==9 || i==10 || i==14 || i==15 || i==16 || i==17 || i==25 || i==27 || i==28 || i==30 || i==31 || i==32 || i==36 || i==37 || i==40 || i==41 || i==42 || i==43 || i==44 || i==45 || i==46 || i==47 || i==49 || i==51 || i==52 || i==53 || i==55 || i==57 || i==58 || i==62)
{
map_position[3][i][3]=1; //All the movements with a wall
}
else
{
map_position[3][i][3]=0; //All the movements without a wall
}
if (x==8)
{
x=1;
y++;
}
else
{
x++;
}
}
x=1;
y=1;
//Define Up movement
for (i=1;i<65;i++){
map_position[3][i][1]=x;
map_position[3][i][2]=y;
if (i==1 || i==2 || i==3 || i==4 || i==5 || i==6 || i==7 || i==8 || i==10 || i==11 || i==12 || i==13 || i==15 || i==18 || i==19 || i==20 || i==23 || i==25 || i==26 || i==28 || i==29 || i==31 || i==33 || i==37 || i==39 || i==41 || i==46 || i==55 || i==59 || i==60 || i==61)
{
map_position[3][i][3]=1; //All the movements with a wall
}
else
{
map_position[3][i][3]=0; //All the movements without a wall
}
if (x==8)
{
x=1;
y++;
}
else
{
x++;
}
}
*/
// DEFINING THE CHARACTERS
String name[3];
String attackName[3][3];
int character[3][7];
//Character Julen
character[1][1]=110; //actual health
character[1][2]=110; //max health
character[1][3]=1; //attack
character[1][4]=1; //defense
character[1][5]=1; //int refeered to attack 1
character[1][6]=2; //int refeered to attack 2
character[1][7]=3; //int refeered to attack 3
name[1]="Julen";
attackName[1][1]="Stone trowing";
attackName[1][2]="Log hit";
attackName[1][3]="Camusean existencialism attack";
//Character Carlos
character[2][1]=90; //actual health
character[2][2]=90; //max health
character[2][3]=1; //attack
character[2][4]=1; //defense
character[2][5]=4; //int refeered to attack 1
character[2][6]=5; //int refeered to attack 2
character[2][7]=6; //int refeered to attack 3
name[2]="Carlos";
attackName[2][1]="Half death man's kick";
attackName[2][2]="Drunked man's technique";
attackName[2][3]="Freeletics workout result";
//Character Alejandro
character[3][1]=100; //actual health
character[3][2]=100; //max health
character[3][3]=1; //attack
character[3][4]=1; //defense
character[3][5]=7; //int refeered to attack 1
character[3][6]=8; //int refeered to attack 2
character[3][7]=9; //int refeered to attack 3
name[3]="Alejandro";
attackName[3][1]="...";
attackName[3][2]="Arcos knive slash";
attackName[3][3]="...";
//DEFINING ENEMIES
String nameEnemy[4];
String attackNameEnemy[4][3];
int characterEnemy[4][7];
//Enemy 1
characterEnemy[1][1]=100; //actual health
characterEnemy[1][2]=100; //max health
characterEnemy[1][3]=100; //attack
characterEnemy[1][4]=100; //defense
characterEnemy[1][5]=100; //int refeered to attack 1
characterEnemy[1][6]=100; //int refeered to attack 2
characterEnemy[1][7]=100; //int refeered to attack 3
nameEnemy[1]="Enemy 1";
attackNameEnemy[1][1]="ARCOCAPAZ";
attackNameEnemy[1][2]="Pooostmultiplication";
attackNameEnemy[1][3]="Gazebo fatality";
//Enemy 2
characterEnemy[2][1]=100; //actual health
characterEnemy[2][2]=100; //max health
characterEnemy[2][3]=100; //attack
characterEnemy[2][4]=100; //defense
characterEnemy[2][5]=100; //int refeered to attack 1
characterEnemy[2][6]=100; //int refeered to attack 2
characterEnemy[2][7]=100; //int refeered to attack 3
nameEnemy[2]="Enemy 2";
attackNameEnemy[2][1]="Badoo like";
attackNameEnemy[2][2]="Definition of PID";
attackNameEnemy[2][3]="...";
//Enemy 3
characterEnemy[3][1]=100; //actual health
characterEnemy[3][2]=100; //max health
characterEnemy[3][3]=100; //attack
characterEnemy[3][4]=100; //defense
characterEnemy[3][5]=100; //int refeered to attack 1
characterEnemy[3][6]=100; //int refeered to attack 2
characterEnemy[3][7]=100; //int refeered to attack 3
nameEnemy[3]="Enemy 3";
attackNameEnemy[3][1]="Robust stability";
attackNameEnemy[3][2]="Nyquist criteria";
attackNameEnemy[3][3]="Laboratory exam";
//Enemy 3
characterEnemy[4][1]=100; //actual health
characterEnemy[4][2]=100; //max health
characterEnemy[4][3]=100; //attack
characterEnemy[4][4]=100; //defense
characterEnemy[4][5]=100; //int refeered to attack 1
characterEnemy[4][6]=100; //int refeered to attack 2
characterEnemy[4][7]=100; //int refeered to attack 3
nameEnemy[4]="Enemy 4";
attackNameEnemy[4][1]="...";
attackNameEnemy[4][2]="...";
attackNameEnemy[4][3]="...";
cout << map_position[3][56][3] ; //trying that the map is bieng well created
return 0;
}