/// <summary> /// Metoda factory generująca koło /// </summary> /// <param name="reversed">Czy wartości mają być odwrócone</param> /// <param name="size">Rozmiar</param> /// <param name="stateCount">Ilość możliwych wartości komórek</param> /// <returns>Układ początkowy z kołem</returns> internal static InitialConditions CircleFactory(bool reversed = false, int size = 30, int stateCount = SPDAssets.MAX, bool twoState = false) { InitialConditionsGrid ig = InitialConditionsGrid.CircleFactory(size, twoState ? 2 : stateCount); ig.Transform(GetTransformation(twoState ? 2 : stateCount, reversed), twoState ? 2 : stateCount); if (twoState) { ig.Transform((x) => (x == 0 ? 0 : stateCount - 1), 2); } var ic = new InitialConditions { Name = "Koło " + (reversed ? "- odwrócone kolory" : ""), Grid = ig }; return(ic); }