mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-05-01 00:15:00 -04:00
Cleaned up readyToRank logic a bit.
This commit is contained in:
parent
1cab83236c
commit
31119f402a
1 changed files with 6 additions and 9 deletions
|
@ -112,17 +112,14 @@ module.exports = class MyMatchesTabView extends CocoView
|
|||
|
||||
readyToRank: (session) ->
|
||||
return false unless session?.get('levelID') # If it hasn't been denormalized, then it's not ready.
|
||||
|
||||
c1 = session?.get('code')
|
||||
c2 = session?.get('submittedCode')
|
||||
team = session?.get('team')
|
||||
thangSpellArr = (s.split("/") for s in session?.get('teamSpells')[team])
|
||||
return false unless c1
|
||||
|
||||
return false unless c1 = session.get('code')
|
||||
return false unless team = session.get('team')
|
||||
return true unless c2 = session.get('submittedCode')
|
||||
thangSpellArr = (s.split("/") for s in session.get('teamSpells')[team])
|
||||
for item in thangSpellArr
|
||||
thang = item[0]
|
||||
spell = item[1]
|
||||
return true if c1[thang][spell] isnt c2?[thang][spell]
|
||||
return true if c1[thang][spell] isnt c2[thang][spell]
|
||||
return false
|
||||
|
||||
rankSession: (e) ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue