MCPcopy Create free account
hub / github.com/melonjs/melonJS / checkMaxLevel

Function checkMaxLevel

packages/melonjs/tests/quadtree.spec.js:456–461  ·  view source on GitHub ↗
(node, maxLevel)

Source from the content-addressed store, hash-verified

454
455 // verify max depth: walk the tree and check no node exceeds level 2
456 const checkMaxLevel = (node, maxLevel) => {
457 expect(node.level).toBeLessThanOrEqual(maxLevel);
458 for (const child of node.nodes) {
459 checkMaxLevel(child, maxLevel);
460 }
461 };
462 checkMaxLevel(world.broadphase, 2);
463
464 // all items should still be retrievable

Callers 1

quadtree.spec.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected