Created
June 11, 2010 19:44
-
-
Save marick/434940 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
(know "rules that determine the life or death of a cell in the sucessor generation" | |
(successor ...cell...) =means=> (killed ...cell...) | |
(provided ; underpopulation | |
(living? ...cell...) => true | |
(living-neighbor-count ...cell...) =from=> [0, 1]) | |
(or ; overpopulation | |
(living? ...cell...) => true | |
(living-neighbor-count ...cell...) =from=> [4 ,,, 8]) | |
(or ; not enough cells to bring to life | |
(living? ...cell...) => false | |
(living-neighbor-count ...cell...) =from=> [0,,,2]) ; | |
(or ; too many cells to bring to life | |
(living? ...cell...) => false | |
(living-neighbor-count ...cell...) =from=> [4,,,8]) ; | |
(successor ...cell...) =means=> (vivified ...cell...) | |
(provided | |
(living? ...cell...) => true | |
(living-neighbor-count ...cell...) =from=> [2, 3]) | |
(or | |
(living? ...cell...) => false | |
(living-neighbor-count ...cell...) => 3) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment