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

Method isOpposite

app/lib/level-generation.js:1108–1110  ·  view source on GitHub ↗
(direction)

Source from the content-addressed store, hash-verified

1106 }
1107
1108 isOpposite (direction) {
1109 return this.vector.x === direction.vector.x * -1 && this.vector.y === direction.vector.y * -1
1110 }
1111
1112 isOrthogonal (direction) {
1113 return Math.abs(this.vector.x - direction.vector.x) === 1 && Math.abs(this.vector.y - direction.vector.y) === 1

Callers 1

getRelationshipMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected