Skip to content

Commit

Permalink
remove redundant ball save code #257
Browse files Browse the repository at this point in the history
  • Loading branch information
jabdoa2 committed May 6, 2016
1 parent ced2bf6 commit e6f8617
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions mpf/modes/game/code/game.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,6 @@ def ball_ended(self, ev_result=True, **kwargs):
self.game_ending()
return

if self.player.extra_balls:
self.shoot_again()
return

if (self.player.ball ==
self.machine.config['game']['balls_per_game'] and
self.player.number == self.num_players):
Expand Down Expand Up @@ -303,26 +299,6 @@ def game_ended(self, **kwargs):
del kwargs
self.log.debug("Entering Game.game_ended()")

def award_extra_ball(self, num=1):
"""Awards the player an extra ball.
Args:
num: Integer of the number of extra balls to award. Default is 1.
TODO: The limit checking is not yet implemented
"""
self.log.debug("Entering Game.award_extra_ball()")
self.player.extra_balls += num
self.machine.events.post('extra_ball_awarded')
# todo add the limit checking

def shoot_again(self):
"""Called when the same player should shoot again."""
self.log.debug("Player %s Shoot Again", self.player.index + 1)
if self.player.extra_balls > 0:
self.player.extra_balls -= 1
self.ball_starting()

def set_balls_in_play(self, balls):
"""Sets the number of balls in play to the value passed.
Expand Down

0 comments on commit e6f8617

Please sign in to comment.