MCPcopy Create free account
hub / github.com/codecombat/codecombat / readyToRank

Method readyToRank

app/models/LevelSession.js:52–65  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50 }
51
52 readyToRank () {
53 let c1, c2, team
54 if (!this.get('levelID')) { return false } // If it hasn't been denormalized, then it's not ready.
55 if (!(c1 = this.get('code'))) { return false }
56 if (!(team = this.get('team'))) { return false }
57 if (!(c2 = this.get('submittedCode'))) { return true }
58 const thangSpellArr = (Array.from(teamSpells[team]).map((s) => s.split('/')))
59 for (const item of Array.from(thangSpellArr)) {
60 const thang = item[0]
61 const spell = item[1]
62 if (c1[thang][spell] !== (c2[thang] != null ? c2[thang][spell] : undefined)) { return true }
63 }
64 return false
65 }
66
67 isMultiplayer () {
68 return (this.get('submittedCodeLanguage') != null) && (this.get('team') != null)

Callers 11

refreshMatchesMethod · 0.80
afterRenderMethod · 0.80
getRenderDataMethod · 0.80
updateButtonMethod · 0.80
rankSessionMethod · 0.80
getRenderDataMethod · 0.80
submitLadderMethod · 0.80
getRenderDataMethod · 0.80
getRenderDataMethod · 0.80
submitLadderMethod · 0.80
getRenderDataMethod · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected