mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-24 08:08:15 -05:00
Updated rank my game check, fixes #666
This commit is contained in:
parent
37beb1bc6b
commit
648df5eb41
1 changed files with 10 additions and 1 deletions
|
@ -112,9 +112,18 @@ module.exports = class MyMatchesTabView extends CocoView
|
||||||
|
|
||||||
readyToRank: (session) ->
|
readyToRank: (session) ->
|
||||||
return false unless session?.get('levelID') # If it hasn't been denormalized, then it's not ready.
|
return false unless session?.get('levelID') # If it hasn't been denormalized, then it's not ready.
|
||||||
|
|
||||||
c1 = session?.get('code')
|
c1 = session?.get('code')
|
||||||
c2 = session?.get('submittedCode')
|
c2 = session?.get('submittedCode')
|
||||||
c1 and not _.isEqual(c1, c2)
|
team = session?.get('team')
|
||||||
|
thangSpellArr = (s.split("/") for s in session?.get('teamSpells')[team])
|
||||||
|
return false unless c1
|
||||||
|
|
||||||
|
for item in thangSpellArr
|
||||||
|
thang = item[0]
|
||||||
|
spell = item[1]
|
||||||
|
return true if c1[thang][spell] isnt c2?[thang][spell]
|
||||||
|
return false
|
||||||
|
|
||||||
rankSession: (e) ->
|
rankSession: (e) ->
|
||||||
button = $(e.target).closest('.rank-button')
|
button = $(e.target).closest('.rank-button')
|
||||||
|
|
Loading…
Reference in a new issue