mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-14 07:00:01 -04:00
Let's try less emphasis on most recently submitted games.
This commit is contained in:
parent
4082110382
commit
d881476731
1 changed files with 1 additions and 1 deletions
|
@ -115,7 +115,7 @@ findRandomSession = (queryParams, callback) ->
|
|||
return callback err, null unless startDate
|
||||
now = new Date()
|
||||
interval = now - startDate
|
||||
cutoff = new Date now - Math.pow(Math.random(), 5) * interval
|
||||
cutoff = new Date now - Math.pow(Math.random(), 3) * interval
|
||||
queryParams.submitDate = $gte: startDate, $lt: cutoff
|
||||
selection = 'team totalScore transpiledCode submittedCodeLanguage teamSpells levelID creatorName creator submitDate'
|
||||
LevelSession.findOne(queryParams).sort(submitDate: -1).select(selection).lean().exec (err, session) ->
|
||||
|
|
Loading…
Reference in a new issue