public void checkBonuses byte step back int Point pos Point m_BE m_bot

 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
public void checkBonuses()
{
byte step[],back[];
int i=0;
Point pos = (Point) m_BE.m_bot.m_pos.clone();
if (m_BE.m_map[pos.x+m_BE.m_scale][pos.y]=='b' || m_BE.m_map[pos.x+m_BE.m_scale][pos.y]=='v'
|| m_BE.m_map[pos.x+m_BE.m_scale][pos.y]=='f'){
i = (m_BE.m_scale- (pos.x%m_BE.m_scale))/m_BE.m_bot.m_speed;
step = new byte[i];
back = new byte[i];
for(int j = 0; j<i;++j){
step[j] = 2; back[j] = 0; }
for (int j =0;j<i;++j){
m_steps.add(back[j]);
}
for (int j =0;j<i;++j){
m_steps.add(step[j]);
}
}
else if (m_BE.m_map[pos.x-m_BE.m_scale][pos.y]=='b' || m_BE.m_map[pos.x-m_BE.m_scale][pos.y]=='v'
|| m_BE.m_map[pos.x-m_BE.m_scale][pos.y]=='f'){
i = (m_BE.m_scale- (pos.x%m_BE.m_scale))/m_BE.m_bot.m_speed;
step = new byte[i];
back = new byte[i];
for(int j = 0; j<i;++j){
step[j] = 0; back[j] = 2; }
for (int j =0;j<i;++j){
m_steps.add(back[j]);
}
for (int j =0;j<i;++j){
m_steps.add(step[j]);
}
}
else if (m_BE.m_map[pos.x][pos.y+m_BE.m_scale]=='b' || m_BE.m_map[pos.x][pos.y+m_BE.m_scale]=='v'
|| m_BE.m_map[pos.x][pos.y+m_BE.m_scale]=='f'){
i = (m_BE.m_scale- (pos.x%m_BE.m_scale))/m_BE.m_bot.m_speed;
step = new byte[i];
back = new byte[i];
for(int j = 0; j<i;++j){
step[j] = 3; back[j] = 1; }
for (int j =0;j<i;++j){
m_steps.add(back[j]);
}
for (int j =0;j<i;++j){
m_steps.add(step[j]);
}
}
else if (m_BE.m_map[pos.x][pos.y-m_BE.m_scale]=='b' || m_BE.m_map[pos.x][pos.y-m_BE.m_scale]=='v'
|| m_BE.m_map[pos.x][pos.y-m_BE.m_scale]=='f'){
i = (m_BE.m_scale- (pos.x%m_BE.m_scale))/m_BE.m_bot.m_speed;
step = new byte[i];
back = new byte[i];
for(int j = 0; j<i;++j){
step[j] = 1; back[j] = 3; }
for (int j =0;j<i;++j){
m_steps.add(back[j]);
}
for (int j =0;j<i;++j){
m_steps.add(step[j]);
}
}
}