Skip to content

Commit f0b9df4

Browse files
committed
testing rankings6
1 parent 25b94bb commit f0b9df4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/pingpong.coffee

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ show_player_stats = (msg) ->
5252
msg.send "#{player}'s record: #{replies[0] or 0} - #{replies[1] or 0}"
5353

5454
if !!replies[0] and !!replies[1]
55-
msg.send "¡#{player} needs to step up their pong game!"
55+
msg.send "#{player} needs to step up their pong game!"
5656

5757

5858
show_match_stats = (msg) ->
@@ -83,6 +83,8 @@ print_player_and_win_pct = (player, msg) ->
8383
multi.exec (err, replies) ->
8484
wins = replies[0] or 0
8585
losses = replies[1] or 0
86+
msg.send "#{player}'s record: #{wins} - #{losses}"
87+
8688
winPct = (wins / (wins + losses)) * 100
8789

8890
msg.send "#{player}: #{winPct}%"
@@ -91,5 +93,4 @@ show_rankings = (msg) ->
9193
multi = redisClient.multi()
9294
multi.keys "@*"
9395
multi.exec (err, replies) ->
94-
msg.send replies[0]
9596
print_player_and_win_pct player, msg for player in replies[0]

0 commit comments

Comments
 (0)