Skip to content

Instantly share code, notes, and snippets.

@brecert
Created August 22, 2018 12:55
Show Gist options
  • Save brecert/760fda3d19b266971604433b2c7b7188 to your computer and use it in GitHub Desktop.
Save brecert/760fda3d19b266971604433b2c7b7188 to your computer and use it in GitHub Desktop.
# Logic
~ Logic
| desc : generic logic class
| inputs : 0
| outputs : 1
~ Battery < CoreLogic
| desc : a percentage type
| inputs : 0
| outputs : 1
# Gates
~ Gate < CoreLogic
| desc : generic gate class
| inputs : 1
| outputs : 1
~ Not < Gate
| desc : invert input
| inputs : 1
| outputs : 1
~ Or < Gate
| desc : active when any input is active
| inputs : range(2..)
| outputs : 1
~ And < Gate
| desc : active only when all inputs are active
| inputs : range(2..)
| outputs : 1
# Outputs?
~ Speech < Logic
| desc : display text
| properties
| text : String
| inputs : 1
| outputs : 1 # on text successfully outputted?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment