Skip to content

Commit b768a1c

Browse files
authored
Merge pull request Wireframe-Magazine#7 from 64kramsystem/fix_soccer_other_team_computations
Soccer: Fix two "other_team" conditional expressions
2 parents 6b2c174 + ee80513 commit b768a1c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

soccer-master/soccer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ def update(self):
571571
target.x = max(AI_MIN_X, min(AI_MAX_X, target.x))
572572
target.y = max(AI_MIN_Y, min(AI_MAX_Y, target.y))
573573

574-
other_team = 1 if self.team == 0 else 1
574+
other_team = 1 if self.team == 0 else 0
575575
speed = LEAD_PLAYER_BASE_SPEED
576576
if game.teams[other_team].human():
577577
speed += game.difficulty.speed_boost
@@ -794,7 +794,7 @@ def update(self):
794794
o = self.ball.owner
795795
pos, team = o.vpos, o.team
796796
owners_target_goal = game.goals[team]
797-
other_team = 1 if team == 0 else 1
797+
other_team = 1 if team == 0 else 0
798798

799799
if self.difficulty.goalie_enabled:
800800
# Find the nearest opposing team player to the goal, and make them mark the goal

0 commit comments

Comments
 (0)