public static Form GenerateOscillatorForm(OscillatorFormTypes oscillatorFormType) { switch (oscillatorFormType) { case OscillatorFormTypes.Blinker: return(GenerateBlinker()); case OscillatorFormTypes.Toad: return(GenerateToad()); case OscillatorFormTypes.Pulsar: return(GeneratePulsar()); default: throw new ArgumentOutOfRangeException(); } }
/// <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)); }