mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-26 00:58:00 -05:00
commit
3a931ad105
4 changed files with 6 additions and 7 deletions
|
@ -76,8 +76,8 @@
|
|||
// Additional JS functions here
|
||||
window.fbAsyncInit = function() {
|
||||
FB.init({
|
||||
appId : '148832601965463', // App ID
|
||||
channelUrl : 'http://codecombat.com/channel.html', // Channel File
|
||||
appId : document.location.origin === 'http://localhost:3000' ? '607435142676437' : '148832601965463', // App ID
|
||||
channelUrl : document.location.origin +'/channel.html', // Channel File
|
||||
status : true, // check login status
|
||||
cookie : true, // enable cookies to allow the server to access the session
|
||||
xfbml : true // parse XFBML
|
||||
|
|
|
@ -5,7 +5,7 @@ block content
|
|||
h1#site-slogan(data-i18n="home.slogan") Learn to Code JavaScript by Playing a Game
|
||||
|
||||
#trailer-wrapper
|
||||
<iframe width="920" height="518" src="//www.youtube.com/embed/1zjaA13k-dA?rel=0&controls=0&modestbranding=1&showinfo=0&iv_load_policy=3&vq=hd720&wmode=transparent" frameborder="0" allowfullscreen></iframe>
|
||||
<iframe width="920" height="518" src="//www.youtube.com/embed/1zjaA13k-dA?rel=0&controls=0&modestbranding=1&showinfo=0&iv_load_policy=3&vq=hd720&wmode=transparent" frameborder="0" wmode="opaque" allowfullscreen></iframe>
|
||||
img(src="/images/pages/home/video_border.png")
|
||||
|
||||
hr
|
||||
|
|
|
@ -183,7 +183,6 @@ LevelHandler = class LevelHandler extends Handler
|
|||
|
||||
query.exec (err, sessionResults) ->
|
||||
return res.send([]) unless sessionResults.length
|
||||
res.send(sessionResults)
|
||||
userMap = {}
|
||||
userMap[u._id] = u.facebookID for u in userResults
|
||||
session.facebookID = userMap[session.creator] for session in sessionResults
|
||||
|
|
|
@ -201,8 +201,8 @@ determineIfSessionShouldContinueAndUpdateLog = (sessionID, sessionRank, cb) ->
|
|||
updatedSession = updatedSession.toObject()
|
||||
|
||||
totalNumberOfGamesPlayed = updatedSession.numberOfWinsAndTies + updatedSession.numberOfLosses
|
||||
if totalNumberOfGamesPlayed < 5
|
||||
console.log "Number of games played is less than 5, continuing..."
|
||||
if totalNumberOfGamesPlayed < 10
|
||||
console.log "Number of games played is less than 10, continuing..."
|
||||
cb null, true
|
||||
else
|
||||
ratio = (updatedSession.numberOfLosses) / (totalNumberOfGamesPlayed)
|
||||
|
@ -231,7 +231,7 @@ findNearestBetterSessionID = (levelOriginalID, levelMajorVersion, sessionID, ses
|
|||
team: opposingTeam
|
||||
|
||||
if opponentSessionTotalScore < 30
|
||||
queryParameters["totalScore"]["$gt"] = opponentSessionTotalScore + 1
|
||||
queryParameters["totalScore"]["$gt"] = opponentSessionTotalScore + 2
|
||||
|
||||
limitNumber = 1
|
||||
|
||||
|
|
Loading…
Reference in a new issue