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