Skip to content

Commit

Permalink
Fix some bugs in python version
Browse files Browse the repository at this point in the history
  • Loading branch information
bambuchaAdm committed Jul 15, 2012
1 parent a03d8f7 commit 77b19ce
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions python/trivia.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,28 +48,28 @@ def roll(self, roll):

if self.in_penalty_box[self.current_player]:
if roll % 2 != 0:
is_getting_out_of_penalty_box = True
self.is_getting_out_of_penalty_box = True

print "%s is getting out of the penalty box" % self.players[self.current_player]
self.places[self.current_player] = self.places[self.current_player] + roll
if self.places[self.current_player] > 11:
self.places[self.current_player] = self.places[self.current_player] - 12

print self.players[self.current_player] + \
'\'s new location is' + \
'\'s new location is ' + \
str(self.places[self.current_player])
print "The category is %s" % self._current_category
self._ask_question()
else:
print "%s is not getting out of the penalty box" % self.players[self.current_player]
is_getting_out_of_penalty_box = False
self.is_getting_out_of_penalty_box = False
else:
self.places[self.current_player] = self.places[self.current_player] + roll
if self.places[self.current_player] > 11:
self.places[self.current_player] = self.places[self.current_player] - 12

print self.players[self.current_player] + \
'\'s new location is' + \
'\'s new location is ' + \
str(self.places[self.current_player])
print "The category is %s" % self._current_category
self._ask_question()
Expand Down Expand Up @@ -100,7 +100,7 @@ def was_correctly_answered(self):
self.purses[self.current_player] += 1
print self.players[self.current_player] + \
' now has ' + \
self.purses[self.current_player] + \
str(self.purses[self.current_player]) + \
' Gold Coins.'

winner = self._did_player_win()
Expand Down

0 comments on commit 77b19ce

Please sign in to comment.