|
@ -9,6 +9,9 @@ char field[23][29]; |
|
|
int Ballx = -1; |
|
|
int Ballx = -1; |
|
|
int Bally = 27; |
|
|
int Bally = 27; |
|
|
|
|
|
|
|
|
|
|
|
int fieldWidth = 25; |
|
|
|
|
|
int fieldHeigth = 30; |
|
|
|
|
|
|
|
|
void buildBin(int width, int heigth){ |
|
|
void buildBin(int width, int heigth){ |
|
|
field[width][heigth] = 'V'; |
|
|
field[width][heigth] = 'V'; |
|
|
field[width+1][heigth+1] = '\\'; |
|
|
field[width+1][heigth+1] = '\\'; |
|
@ -96,9 +99,6 @@ void getStartPosition() |
|
|
|
|
|
|
|
|
void clearField() |
|
|
void clearField() |
|
|
{ |
|
|
{ |
|
|
int fieldWidth = 25; |
|
|
|
|
|
int fieldHeigth = 30; |
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i <= fieldWidth; i++) |
|
|
for (int i = 0; i <= fieldWidth; i++) |
|
|
{ |
|
|
{ |
|
|
for (int j = 0; j <= fieldHeigth; j++) |
|
|
for (int j = 0; j <= fieldHeigth; j++) |
|
@ -132,4 +132,8 @@ int checkBallPosition() |
|
|
{ |
|
|
{ |
|
|
return 1; |
|
|
return 1; |
|
|
} |
|
|
} |
|
|
|
|
|
else if (BinY > Bally || field[Ballx][Bally - 1] == '_' || Ballx > fieldWidth || Ballx < 0) |
|
|
|
|
|
{ |
|
|
|
|
|
return 2; |
|
|
|
|
|
} |
|
|
} |
|
|
} |