mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-22 10:55:19 -04:00
Ties are not victories in the emails.
This commit is contained in:
parent
4062bba245
commit
bba3c78107
2 changed files with 2 additions and 2 deletions
|
@ -24,7 +24,7 @@ div#columns.row
|
|||
if team.chartData
|
||||
tr
|
||||
th(colspan=4, style="color: #{team.primaryColor}")
|
||||
img(src="https://chart.googleapis.com/chart?chs=450x125&cht=lxy&chco=#{team.chartColor}&chtt=Score%3A+#{team.currentScore}&chts=#{team.chartColor},16,c&chf=a,s,000000FF&chls=2&chm=o,#{team.chartColor},0,4&chd=t:#{team.chartData}")
|
||||
img(src="https://chart.googleapis.com/chart?chs=450x125&cht=lxy&chco=#{team.chartColor}&chtt=Score%3A+#{team.currentScore}&chts=#{team.chartColor},16,r&chf=a,s,000000FF&chls=2&chm=o,#{team.chartColor},0,4&chd=t:#{team.chartData}")
|
||||
|
||||
tr
|
||||
th Result
|
||||
|
|
|
@ -76,7 +76,7 @@ sendLadderUpdateEmail = (session, daysAgo) ->
|
|||
# (We could look at strongest/weakest, but we'd have to fetch everyone, or denormalize more.)
|
||||
matches = _.filter session.matches, (match) -> match.date >= (new Date() - 86400 * 1000 * daysAgo)
|
||||
defeats = _.filter matches, (match) -> match.metrics.rank is 1 and match.opponents[0].metrics.rank is 0
|
||||
victories = _.filter matches, (match) -> match.metrics.rank is 0
|
||||
victories = _.filter matches, (match) -> match.metrics.rank is 0 and match.opponents[0].metrics.rank is 1
|
||||
defeat = _.last defeats
|
||||
victory = _.last victories
|
||||
|
||||
|
|
Loading…
Reference in a new issue