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

Method loadRandomSessions

app/views/play/SpectateView.js:101–111  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

99 }
100
101 loadRandomSessions () {
102 if (!this.sessionOne || !this.sessionTwo) {
103 return this.fetchRandomSessionPair((err, data) => {
104 if (err != null) { return console.log(`There was an error fetching the random session pair: ${data}`) }
105 this.setSessions(data[0]._id, data[1]._id)
106 return this.load()
107 })
108 } else {
109 return this.load()
110 }
111 }
112
113 setLevel (level, supermodel) {
114 this.level = level

Callers 2

fMethod · 0.95
constructorMethod · 0.95

Calls 4

setSessionsMethod · 0.95
loadMethod · 0.95
logMethod · 0.80

Tested by

no test coverage detected