Skip to content

Commit

Permalink
Grammar when printing card counts for who's next
Browse files Browse the repository at this point in the history
  • Loading branch information
dgw committed Jul 24, 2015
1 parent fd3dab1 commit a1e0a43
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions unobot.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
'YOUR_CARDS': "Your cards (%d): %s",
'NEXT_START': "Next: ",
'SB_START': "Standings: ",
'SB_PLAYER': "%s (%s cards)",
'SB_PLAYER': "%s (%d %s)",
'D2': "%s draws two and is skipped!",
'CARDS': "Cards: %s",
'WD4': "%s draws four and is skipped!",
Expand Down Expand Up @@ -292,8 +292,9 @@ def render_counts(self, full=NO):
plr = len(self.players) - 1
arr = []
while plr != stop:
arr.append(STRINGS['SB_PLAYER'] % (self.playerOrder[plr], len(
self.players[self.playerOrder[plr]])))
cards = len(self.players[self.playerOrder[plr]])
g_cards = "card" if cards == 1 else "cards"
arr.append(STRINGS['SB_PLAYER'] % (self.playerOrder[plr], cards, g_cards))
plr += inc
if plr == len(self.players) and not full:
plr = 0
Expand Down

0 comments on commit a1e0a43

Please sign in to comment.