(direction)
| 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 |