blob: e9af960d36f752c258256f52942ee7da51f44790 (
plain)
1
2
3
4
5
6
7
8
9
10
|
(local proto (require :lib.proto))
{:init (proto.table-method :cell.init)
;; given its 8 neighbors returns a new cell (or nil)
;; TODO: other returns via either a clojure or coroutines
:birth (proto.meta-method :cell.birth)
:update (proto.meta-method :cell.update)
;; returns a number from 0 to 1
:aliveness (proto.meta-method-opt :cell.generation #0)
:color (proto.meta-method-opt :cell.color #[0 0 0])}
|