Program Cs
using System;
using System.Collections.Generic;
using System.Text;

namespace Organismic
{
    class Program
    {
        static void Main(string[] args)
        {
        }
    }
}

namespace Entity
{
    class BaseEntity
    {
        // private variables
        private static int Oid;
        private string name;
        private List<char> recomb;
        private Queue<BaseEntity> welds;
        private int reproduction;
        private int age;
        private string inBuffer;
        private bool isPregnant;
        private int nourishment;

        // initialization method
        void Initialize()
        {
            ++Oid;
            age = 0;
        }

        // set the objects name
        void setName(string inName)
        {
            name = inName;
        }

        // add recombinations
        void addRecomb(char r)
        {
            recomb.Add(r);
        }

        // add recombinations
        void addRecomb(char[] r)
        {
            recomb = r;
        }

        // get recombinations
        List<char> getRecomb()
        {
            return recomb.ToArray();
        }

        bool isFemale()
        {
            if (recomb.Find('Y'))
            {
                return 1;
            }
            return 0;
        }

        // new weld
        void addWeld(BaseEntity w)
        {
            welds.Add(w);
        }

        void Heatbeat()
        {
            int l1 = recomb.Count;
            int l2 = welds.Count;

            if (l1 > 1 && l2 > 1)
            {
                for (i = 0; i < l1; ++i)
                {
                    char check = recomb[i];
                    switch (check)
                    {

                    /*  Basic Recombinants
                     *  N - Lifespan Long - slot 1
                     *  n - Lifespan Short - slot 1
                     *  R - Ability to Read Input - slot 2
                     *  W - Ability to Write Output - slot 3
                     *  B - Long Reproduction Cycle - 
                     *  b - Short Reproduction Cycle
                     *  M - Monoamourous
                     *  P - Polyamourous
                     *  X/Y - male/female
                     */
                        case 'N':
                            if (3000000 < age)
                            {
                                ~BaseEntity(); // die
                            }
                        case 'n' :
                            if (30000 < age)
                            {
                                ~BaseEntity(); // die
                            }
                        case 'R' :
                            Console.Write("\n");
                            Console.Write(Oid);
                            Console.Write(": Data?\n");
                            inBuffer = Console.Read;
                        case 'W' :
                            Console.Write("\n");
                            Console.Write(Oid);
                            Console.Write("Writeable life form.\n");
                            Console.Write(recomb);
                        case 'M' :
                            while (l2 > 1)
                            {
                                welds.Dequeue();
                                --l2;
                            }
                        case 'P' :
                        case 'B' :
                            if (isPregnant)
                            {
                                ++reproduction;
                            } else if (recomb.Contains('Y') && welds.Peek().getRecomb().Contains('X'))
                            {
                                isPregnant = true;
                            }

                            if (reproduction > 10000)
                            {
                                // create new child
                                BaseEntity child = new BaseEntity();
                                child.Initialize();

                                List<char> templist = welds.Peek().getRecomb();
                                for (c = 0; c < recomb.Count; ++c)
                                {
                                    if(templist.Contains('N') && recomb.Contains('n'))
                                    {
                                        templist.Remove('N');
                                        templist.Add('n');
                                    }
                                    else if (templist.Contains('n') && recomb.Contains('N'))
                                    {
                                        templist.Remove('n');
                                        templist.Add('N');
                                    }
                                    if(!templist.Contains('R') && recomb.Contains('R'))
                                    {
                                        templist.Add('R');
                                    }
                                    if (!templist.Contains('W') && recomb.Contains('W'))
                                    {
                                        templist.Add('W');
                                    }
                                    if (templist.Contains('B') && recomb.Contains('b'))
                                    {
                                        templist.Remove('B');
                                        templist.Add('b');
                                    }
                                    else if (templist.Contains('b') && recomb.Contains('B'))
                                    {
                                        templist.Remove('b');
                                        templist.Add('B');
                                    }
                                }
                                // add inheritence
                                child.addRecomb();
                                reproduction = 0;
                            }
                        case 'b' :

                            if (isPregnant)
                            {
                                ++reproduction;
                            } else if (recomb.Contains('Y') && welds.Peek().getRecomb().Contains('X'))
                            {
                                isPregnant = true;
                            }

                            if (reproduction > 5000)
                            {
                                // create new child
                                BaseEntity child = new BaseEntity();
                                child.Initialize();

                                List<char> templist = welds.Peek().getRecomb();
                                for (c = 0; c < recomb.Count; ++c)
                                {
                                    if(templist.Contains('N') && recomb.Contains('n'))
                                    {
                                        templist.Remove('N');
                                        templist.Add('n');
                                    }
                                    else if (templist.Contains('n') && recomb.Contains('N'))
                                    {
                                        templist.Remove('n');
                                        templist.Add('N');
                                    }
                                    if(!templist.Contains('R') && recomb.Contains('R'))
                                    {
                                        templist.Add('R');
                                    }
                                    if (!templist.Contains('W') && recomb.Contains('W'))
                                    {
                                        templist.Add('W');
                                    }
                                    if (templist.Contains('B') && recomb.Contains('b'))
                                    {
                                        templist.Remove('B');
                                        templist.Add('b');
                                    }
                                    else if (templist.Contains('b') && recomb.Contains('B'))
                                    {
                                        templist.Remove('b');
                                        templist.Add('B');
                                    }
                                }
                                // add inheritence
                                child.addRecomb();
                                reproduction = 0;
                            }
                    }

                }
            }
        }
    }
}

namespace Resource
{
    class food
    {
        private int nutrients;
    }

    class Aminos : food
    {
        public int nutrients = 1;
    }

    class Sutrinos : food
    {
        public int nutrients = 2;
    }

    class Knixos : food
    {
        public int nutrients = 4;
    }
}
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License