Created
November 30, 2019 17:23
-
-
Save ryanramage/c057252c13aa4494ad1542fbd41fa0f8 to your computer and use it in GitHub Desktop.
niff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library['_'] = function Operator_ (orca, x, y, passive) { | |
Operator.call(this, orca, x, y, '_', passive) | |
this.name = 'niff' | |
this.info = 'Reads offset, if equal to char' | |
this.ports.x = { x: -2, y: 0 } | |
this.ports.y = { x: -1, y: 0 } | |
this.ports.comparison = { x: 1, y: 0 } | |
this.ports.output = { x: 0, y: 1, bang: true } | |
this.operation = function (force = false) { | |
const x = 0 - this.listen(this.ports.x, true) | |
const y = 0 - (this.listen(this.ports.y, true) + 1) | |
this.ports.val = {x, y } | |
const a = this.listen(this.ports.comparison) | |
const b = this.listen(this.ports.val) | |
return a !== b | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.....Z...................................... | |
...h10xTG.GGC..DD.Cc.CD.DGGC..DD.Cc.CD.D.#.. | |
...*:11G.................................... | |
.........40_#............................... | |
...........*h............................... | |
............E............................... | |
............................................ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment