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

Method dimensions

app/models/Level.js:470–490  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

468 }
469
470 dimensions () {
471 let width = 0
472 let height = 0
473 for (const thang of Array.from(this.get('thangs') || [])) {
474 for (const component of Array.from(thang.components)) {
475 const c = component.config
476 if (c == null) { continue }
477 if ((c.width != null) && (c.width > width)) {
478 ({
479 width,
480 } = c)
481 }
482 if ((c.height != null) && (c.height > height)) {
483 ({
484 height,
485 } = c)
486 }
487 }
488 }
489 return { width, height }
490 }
491
492 isLadder () { return Level.isLadder(this.attributes) }
493

Callers 1

onLevelLoadedMethod · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected