Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add age to cell state #1

Open
modul opened this issue Apr 12, 2018 · 0 comments
Open

Add age to cell state #1

modul opened this issue Apr 12, 2018 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@modul
Copy link
Owner

modul commented Apr 12, 2018

Instead of 4 states to track Birth, Survival, Dying and Death, the cell age holds the same information while keeping the two important states Alive and Dead:

`data Life = Alive Int | Dead Int;

rule (Alive age) 2 = Alive (age + 1)
rule (Alive age) 3 = Alive (age +1)
rule (Alive _) _ = Dead 0
rule (Dead age) 3 = Alive 0
rule (Dead age) _ = Dead (age + 1)`

@modul modul added the enhancement New feature or request label Apr 12, 2018
@modul modul self-assigned this Apr 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant