Skip to content

Instantly share code, notes, and snippets.

@lizixroy
Created April 2, 2017 05:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lizixroy/bc9b864a4dac608fb292fc5803aa433e to your computer and use it in GitHub Desktop.
Save lizixroy/bc9b864a4dac608fb292fc5803aa433e to your computer and use it in GitHub Desktop.
Aplysia
class ViewController: UIViewController {
var aplysia: Aplysia?
@IBAction func touchSiphon(_ sender: Any) {
self.aplysia!.siphon.touch()
}
override func viewDidLoad() {
super.viewDidLoad()
let gill = Gill()
let siphon = Siphon()
gill.neurons.append(MotorNeuron())
siphon.neurons.append(SensoryNeuron())
self.aplysia = Aplysia(siphon: siphon, gill: gill)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment