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

Method constructor

app/views/ladder/LadderTabView.js:462–480  ·  view source on GitHub ↗
(level, team, session, limit, league, tournamentId, ageBracket, myTournamentSubmission)

Source from the content-addressed store, hash-verified

460 */
461
462 constructor (level, team, session, limit, league, tournamentId, ageBracket, myTournamentSubmission) {
463 super()
464 this.onLoad = this.onLoad.bind(this)
465 this.onFail = this.onFail.bind(this)
466 this.level = level
467 this.team = team
468 this.session = session
469 this.limit = limit
470 this.league = league
471 this.tournamentId = tournamentId
472 this.ageBracket = ageBracket
473 this.myTournamentSubmission = myTournamentSubmission
474 if (this.myTournamentSubmission) {
475 this.myWins = this.myTournamentSubmission.get('wins')
476 this.myLosses = this.myTournamentSubmission.get('losses')
477 this.myTotalScore = this.myTournamentSubmission.get('totalScore')
478 this.myWinRate = (this.myWins || 0) / Math.max((this.myWins || 0) + (this.myLosses || 0), 1)
479 }
480 }
481
482 collectionParameters (parameters) {
483 parameters.team = this.team

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected