1
This commit is contained in:
1 parent
c0904e806b
commit
c66ace822e
1 file changed
+15
-12
+15
-12
@@ -23,18 +23,21 @@ extern int nKick;
|
||||
|
||||
// 罚球
|
||||
void CStrategySystem::Penalty() {
|
||||
// srand(time(nullptr));
|
||||
// int x = rand() % 2;
|
||||
// if (x) {
|
||||
// if (...)
|
||||
// Direction(HOME1, ball.position);
|
||||
// else
|
||||
// Position(HOME1, ...);
|
||||
// }
|
||||
// else {
|
||||
// if (...)
|
||||
// ...
|
||||
// }
|
||||
srand(time(nullptr));
|
||||
int x = rand() % 2;
|
||||
//1往上射
|
||||
if (x) {
|
||||
if (home1.position.x <= 300 && home1.position.x >= 299 && home1.position.y >= 411 && home1.position.y <= 412)
|
||||
Direction(HOME1, ball.position);
|
||||
else
|
||||
Position(HOME1, CPoint(300, 412));
|
||||
}
|
||||
else {
|
||||
if (home1.position.x <= 300 && home1.position.x >= 299 && home1.position.y >= 407 && home1.position.y<=408)
|
||||
Direction(HOME1, ball.position);
|
||||
else
|
||||
Position(HOME1, CPoint(300,408));
|
||||
}
|
||||
}
|
||||
|
||||
// 争球
|
||||
|
||||
Reference in new issue
Block a user