예제 #1
0
        /// <summary>
        /// Method to generate a table with a gun form of conway's game of life.
        /// </summary>
        /// <param name="gunFormType"> One of the <see cref="GunFormTypes"/> to generate on a table. </param>
        /// <returns> A generated 2D int array with the given gun form. </returns>
        public int[,] GenrateTableWithForm(GunFormTypes gunFormType)
        {
            Form form = FormFactory.GenerateGun(gunFormType);

            return(SpawnForm.GenerateFormOnTable(form));
        }
예제 #2
0
        /// <summary>
        /// Method to generate a table with an oscillator form of conway's game of life.
        /// </summary>
        /// <param name="oscillatorFormType"> One of the <see cref="OscillatorFormTypes"/> to generate on a table. </param>
        /// <returns> A generated 2D int array with the given oscillator form. </returns>
        public int[,] GenrateTableWithForm(OscillatorFormTypes oscillatorFormType)
        {
            Form form = FormFactory.GenerateOscillatorForm(oscillatorFormType);

            return(SpawnForm.GenerateFormOnTable(form));
        }
예제 #3
0
        /// <summary>
        /// Method to generate a table with a spaceship form of conway's game of life.
        /// </summary>
        /// <param name="spaceshipFormType"> One of the <see cref="SpaceshipFormTypes"/> to generate on a table. </param>
        /// <returns> A generated 2D int array with the given spaceship form. </returns>
        public int[,] GenrateTableWithForm(SpaceshipFormTypes spaceshipFormType)
        {
            Form form = FormFactory.GenerateSpaceshipForm(spaceshipFormType);

            return(SpawnForm.GenerateFormOnTable(form));
        }
예제 #4
0
        /// <summary>
        /// Method to generate a table with a stilllife form of conway's game of life.
        /// </summary>
        /// <param name="stillLifeFormType"> One of the <see cref="StillLifeFormTypes"/> to generate on a table. </param>
        /// <returns> A generated 2D int array with the given stilllife form. </returns>
        public int[,] GenrateTableWithForm(StillLifeFormTypes stillLifeFormType)
        {
            Form form = FormFactory.GenerateStillLifeForm(stillLifeFormType);

            return(SpawnForm.GenerateFormOnTable(form));
        }