Click here to Skip to main content
15,896,269 members
Articles / Desktop Programming / WPF

Conway's Game of Life - A Rule Framework and Implementation

Rate me:
Please Sign up or sign in to vote.
5.00/5 (11 votes)
15 Apr 2013CPOL5 min read 27.3K   1.4K   36  
A rule engine based approach to add and remove rules to play Conway's Game of Life
using gameOfLife.Framework;

namespace gameOfLife.Transition
{
    public class Die : ITransition
    {
        public void Apply(ITransitive cellContainer)
        {
            foreach (var cell in cellContainer.Cells)
            {
                if (cell.Age > 3)
                {
                    cell.Kill();
                }
            }
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
India India
is a poor software developer and thinker. Presently working on a theory of "complementary perception". It's a work in progress.

Comments and Discussions