Skip to content

Commit

Permalink
Avoid shooting when not pointing to the target
Browse files Browse the repository at this point in the history
  • Loading branch information
fisadev committed Jul 9, 2012
1 parent 5b2576f commit 9a32e99
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bots/fisa.py
Expand Up @@ -41,7 +41,8 @@ def point_and_shoot(self, target):
self.angle) self.angle)
# aim and shoot # aim and shoot
self.command('turn', value=turn) self.command('turn', value=turn)
self.command('fire') if turn < 0.5:
self.command('fire')


def wall_between(self, position): def wall_between(self, position):
for wall_side in self.wall_sides: for wall_side in self.wall_sides:
Expand Down

0 comments on commit 9a32e99

Please sign in to comment.